这是正确的代码吗 [英] is this correct code
本文介绍了这是正确的代码吗的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
亲爱的所有人,
在下面的表定义中
inve_80c_no int <br /> inve_80C_PF_VPF numeric(18, 0)
在下面的c清晰代码中.
iCommand.Parameters.Add(" ,SqlDbType.NVarChar , 200 ).Value = txt80C_PF_VPF.Text;
这是正确的吗(如果我输入错误,请纠正我
解决方案) div>
我应该是这样的iCommand.Parameters.添加(新的SqlParameter( @ inve_80C_PF_VPF",txt80C_PF_VPF. iCommand.Parameters.Add(" ,SqlDbType.Decimal , 200 ).Value = txt80C_PF_VPF.Text;
我希望这会起作用试试考虑C#页面作为整数
SqlParameter [] sparam = 新 SqlParameter [ 1 ]; sparam [ 0 ] = 新 SqlParameter(@ inve_80c_no,SqlDbType.Int); sparam [ 0 ].Value = 15 ;
Dear All,
in table definition below
inve_80c_no int <br /> inve_80C_PF_VPF numeric(18, 0)
in c sharp code below.
iCommand.Parameters.Add("@inve_80C_PF_VPF", SqlDbType.NVarChar,200).Value = txt80C_PF_VPF.Text;
is this correct if i am wrong please correct me
解决方案
I thing it should be like thisiCommand.Parameters.Add(new SqlParameter("@inve_80C_PF_VPF", txt80C_PF_VPF.Text));
hi
c# alternative for numeric is decimal
iCommand.Parameters.Add("@inve_80C_PF_VPF", SqlDbType.Decimal,200).Value = txt80C_PF_VPF.Text;
I hope This will Work Try it Conside C# page Both as integer
SqlParameter[] sparam = new SqlParameter[1]; sparam[0] = new SqlParameter(@inve_80c_no, SqlDbType.Int); sparam[0].Value = 15;
这篇关于这是正确的代码吗的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文