You tried to assign a null value to a variant




















Web Forms Data Controls. Sign in to vote. The primary key in the database is an auto number. Currently I got an error when I tired adding a new recored: You tried to assign the Null value to a variable that is not a Variant data type. I think I got this error because no value was inserted for the id label How can I let the user insert new records with just inserting the name. Please help! Wednesday, May 30, AM. User posted Your insert command should read insert into [table] [Name] values?

Wednesday, May 30, PM. User posted Have a look at the soure of the aspx page and the sqldatasource should be there. User posted One more question.. User posted Thanks for the answer! I found the Insert parameters and deleted the one for the ID and it worked perfectly Thank you so much.

Post Reply. Check null value of long data type. Visual Basic. How to easily parse DBNull value into other data type. Assign Null value error. NET Framework. DLL returns a variant data type - how to convert and use in VB. Variant data type error. Variant data type. ComboBox Null value variable error. Conversion failed when converting the varchar value 'AccNum' to data type int. Software Development. Remote Development and Debugging Tools. How to use Nuget assembly as files with visual studio community.

All of a sudden importing data from spreadsheet in a form produced the above error it was tested and worked fine over two weeks , the same operation in another form is executing fine. This is bit frustrating when everything seems fine, no errors in logic or elsewhere but things are not working. Finally deleted then copied the underlying external table with another identical one solved it. Your email address will not be published.

Notify me of follow-up comments by email. Notify me of new posts by email. This site uses Akismet to reduce spam.



0コメント

  • 1000 / 1000