数据类型不匹配 [英] data type unable to match

查看:101
本文介绍了数据类型不匹配的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

cmd.Parameters.Add("@es", SqlDbType.Money).Value = Convert.ToInt32(TextBox3.Text);



在数据库中,我有类型为money的列
我想将值作为参数发送给存储过程,我应该写什么toint32,请告诉



in database i have column with type money
i want to send the value as parameter to stored procedure what should i write insted of toint32 please tell

推荐答案

请参见以下图表: Decimal [ ^ ]或Nullable<Decimal>.

问候,

曼弗雷德(Manfred)
See this chart please: Mapping CLR Parameter Data[^]. The chart says to map SqlDbType.Money to either Decimal[^] or Nullable<Decimal>.

Regards,

Manfred


这篇关于数据类型不匹配的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆