参数“表达式"不能转换为类型"DBNull". [英] Argument 'Expression' cannot be converted to type 'DBNull'.

查看:625
本文介绍了参数“表达式"不能转换为类型"DBNull".的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我严重地陷入了错误.
当我尝试运行应用程序并从Menu.vb调用表单(frmCashBook)时
它给出了一个错误,

"Argument ''Expression'' cannot be converted to type ''DBNull''"

它在调用frmCashBook.vb的行中显示错误. frmCashBook.Showdialog
frmCshbook包含datagridview,该视图从数据库加载数据.


请告知问题所在.

谢谢
Furqan

Hi,
I am badly stuck with an error.
When I try to run my application and call a form (frmCashBook) from Menu.vb
It gives an error,

"Argument ''Expression'' cannot be converted to type ''DBNull''"

It shows error at the line that is calling frmCashBook.vb
frmCashBook.Showdialog
frmCshbook contains datagridview, that loads data from database.


Please advise what is the problem.

Thanks
Furqan

推荐答案

您的数据库中有一个或多个字段,或者null值,请对其进行初始化或通过代码null值来处理...
You have one or more field in your database o value null , please initialize it or handle by code null values ...


这篇关于参数“表达式"不能转换为类型"DBNull".的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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