Click here to Skip to main content
15,887,596 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
during insertion in access DB....I m working with vb.net......I have insert value from text box to access DB and I m getting that exception every time....and I have insert " "(Blank String)....if textbox is empty....I didn't show the code it is confidential...help me as erly as possible....Thankx in advance...
Posted

1 solution

Without seeing any table structures or code all I can tell you that the value you are trying to insert into your database is incorrect.

It would suggest to me that you are trying to insert values into a number based column (i.e. number, decimal etc.).

update your question with more information and we will be able to help you more.
 
Share this answer
 
Comments
NikulDarji 15-Sep-11 4:46am    
Thank u very much for help...but i solved that error.....resone behind that error was....I m trying to store empty string value in databse and the empty string value in the command text (SQL) cannot be
stored in MS Access' where "Date/Time" data type specified by the
associated column....
Simon_Whale 15-Sep-11 4:52am    
Glad to see that you solved it :) ADO.NET and dot net has problems with empty column types as they can't be null. I would have a look at the keyword nullable(of t) where t is the column type.

Only strings can hold a nullable value, but you can use nullable(of date), nullable(of integer) etc.

http://msdn.microsoft.com/en-us/library/b3h38hb0%28v=VS.90%29.aspx#Y912

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