通过按钮去执行一个存储过程
Dim dt1 As WinForm.DateTimePicker = e.Form.Controls("DateTimePicker1")
Dim dt2 As WinForm.DateTimePicker = e.Form.Controls("DateTimePicker2")
Dim st1 As String = dt1.text + " 00:00:00"
Dim st2 As String = dt2.text + " 23:59:59"
Dim cmd As new SQLCommand
cmd.C
cmd.CommandText = "gs_get_syxx"
cmd.StoredProcedure = True
cmd.Parameters.Add("@rq1",st1)
cmd.Parameters.Add("@rq2",st2)
cmd.ExecuteNonQuery
点按钮一直报错,提示:将 numeric 转换为数据类型 numeric 时出现算术溢出错误
存储过程直接在SQL中执行正常
经过测试 就2个字段 原来是numeric(9,3),目标是numeric(4,1),已经通过 cast(round(原字段,1) as numeric(4,1)) 等多种方式转换还是不行,请各位老师帮忙看下?
[此贴子已经被作者于2024/4/2 14:05:09编辑过]