|
-
Apr 10th, 2006, 07:57 AM
#2
Re: Insert null in database
The fact that you're calling ToString should have given it away. DBNull.Value is a null value, but calling ToString turns it into an empty String object, which is not the same thing. Plus, I'm guessing that your column takes numerical values, so you should NOT be assigning a String object to it at all. txtVervangcode.Text is a String, so that's wrong. You should be converting that to the appropriate type too.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|