从数据类型 varchar 转换为 numeric 时出错,什么原因?? 400 报错 插入数据时,我使用一个存储过程,返回的时候出现“从数据类型 varchar 转换为 numeric 时出错。”这样的错误。帮忙解决一下。
你是怎么转的?
######本身没有转换。
DbCommand _dbcomm = DB.GetStoredProcCommand("p_au_I_biddinginfo"); DB.AddInParameter(_dbcomm, "@ID", DbType.Int32, _biddinginfo.ID); DB.AddInParameter(_dbcomm, "@Address", DbType.String, _biddinginfo.Address); DB.AddInParameter(_dbcomm, "@Area", DbType.Decimal, _biddinginfo.Area); DB.AddInParameter(_dbcomm, "@Areaid", DbType.Int32, _biddinginfo.Areaid); DB.AddInParameter(_dbcomm, "@Border", DbType.Int32, _biddinginfo.Border); DB.AddInParameter(_dbcomm, "@Cellid", DbType.Int32, _biddinginfo.Cellid); DB.AddInParameter(_dbcomm, "@Cellname", DbType.String, _biddinginfo.Cellname); DB.AddInParameter(_dbcomm, "@Checkstate", DbType.Boolean, _biddinginfo.Checkstate); DB.AddInParameter(_dbcomm, "@Cmessage", DbType.String, _biddinginfo.Cmessage); DB.AddInParameter(_dbcomm, "@Cqq", DbType.String, _biddinginfo.Cqq); DB.AddInParameter(_dbcomm, "@Cuser", DbType.String, _biddinginfo.Cuser); DB.AddInParameter(_dbcomm, "@Ddate", DbType.DateTime, _biddinginfo.Ddate); DB.AddInParameter(_dbcomm, "@description", DbType.String, _biddinginfo.description); DB.AddInParameter(_dbcomm, "@Edatetime", DbType.DateTime, _biddinginfo.Edatetime); DB.AddInParameter(_dbcomm, "@Email", DbType.String, _biddinginfo.Email); DB.AddInParameter(_dbcomm, "@Marker", DbType.String, _biddinginfo.Marker); DB.AddInParameter(_dbcomm, "@Mobile", DbType.String, _biddinginfo.Mobile); DB.AddInParameter(_dbcomm, "@Pdate", DbType.DateTime, _biddinginfo.Pdate); DB.AddInParameter(_dbcomm, "@Pid", DbType.Int32, _biddinginfo.Pid); DB.AddInParameter(_dbcomm, "@Pirce", DbType.Decimal, _biddinginfo.Pirce); DB.AddInParameter(_dbcomm, "@S", DbType.Int32, _biddinginfo.S); DB.AddInParameter(_dbcomm, "@State", DbType.Boolean, _biddinginfo.State); DB.AddInParameter(_dbcomm, "@Styleid", DbType.Int32, _biddinginfo.Styleid); DB.AddInParameter(_dbcomm, "@T", DbType.Int32, _biddinginfo.T); DB.AddInParameter(_dbcomm, "@Type", DbType.Int32, _biddinginfo.Type); DB.AddInParameter(_dbcomm, "@W", DbType.Int32, _biddinginfo.W); // DB.AddInParameter(_dbcomm, "@NumberID", DbType.String, DateTime.Now.ToString("yyyyMMddHHmmssffff"));######肯定要做转换的啊,varchar 要先转成 number######我不明白你的意思。我是插入操作。什么地方需要转换?
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。