|
-
Oct 10th, 2017, 12:27 AM
#19
Re: No data transfer in one column
The point of that NullValue property that you highlighted is to specify what to do when you try to access the field value when it is null. As you said, it is set to '(Throw exception)' by default and that is exactly why an exception is thrown when you try to access the field value when it's null. If you want to keep that setting then you need to do what I said, i.e. check whether the field is null first and then only get the value if it's not. The alternative would be to change that property. I don't know what the other options are but I'd expect that one of them would be to use the default value for the type, which would be a null reference for type String. If you do that, make sure that you change it for all your other nullable fields too. If you don't then the code you have will probably still fail because you'll be assigning a null reference to another field.
Tags for this Thread
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
|