转换溢出错误 [英] Conversion overflows error

查看:97
本文介绍了转换溢出错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



运行存储过程时出现转换溢出"错误.在存储过程中,一列具有30个小数位.由于这个错误.但是,我只有对存储过程的只读访问权限.我无法修改它.所以我需要用代码解决这个问题.

请帮帮我......

Hi,

Am getting the ''conversion overflows'' error while running the stored procedure. In stored procedure one column is having 30 decimal places. Due to this am getting this error. But, i have only read only access to stored procedure. i cant modify it. So i need to solve this problem in code.

Please help me......

Dim objCMD As New SqlCommand
Dim objDA As New SqlDataAdapter
Dim objDS As DataSet

With objCMD
    .Connection = sqlCon
    .Parameters.AddRange(sqlParam)
    .CommandType = CommandType.StoredProcedure
    .CommandText = "stored procedure name"
End With

objDA.SelectCommand = objCMD
objDS = New DataSet
objDA.Fill(objDS)



在数据适配器中填充时会出现此错误.



In data adapter filling am getting this error.

推荐答案

我首先查看您的sqlParam对象(显然是某种列表或数组).其中一个参数一定是引起问题的原因.
I would start by looking at your sqlParam object (obviously a list or array of some sort). One of the parameters must be causing the problem.


好吧,溢出值的类型是什么?一双?十进制?还有别的吗

您的代码是由自动化工具生成的吗?

除了建议您尝试尝试,我们真的无济于事.

调试器是您的朋友.
Well, what is the type of the overflowing value? a double? A Decimal? Something else?

Was your code generated by an automated tool?

We really can''t help you much beyond suggesting things for you to try.

The debugger is your friend.


这篇关于转换溢出错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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