Click here to Skip to main content
15,923,051 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
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
Posted
Updated 1-Mar-11 4:19am
v2
Comments
OriginalGriff 1-Mar-11 7:43am    
Please show us the code it is complaining about...
Furqan Sehgal 1-Mar-11 9:17am    
It complains about frmCashBook.Showdialog
R. Giskard Reventlov 1-Mar-11 10:21am    
It is much more likely that the exception is being caused by whatever it is you are using to bind the gridview. Are you using a data control or binding from code behind?

1 solution

You have one or more field in your database o value null , please initialize it or handle by code null values ...
 
Share this answer
 
Comments
Furqan Sehgal 4-Mar-11 11:53am    
Thanks! I found the same.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900