Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DBNull, Error 13
Message
From
13/01/2003 13:14:48
 
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00741053
Message ID:
00741087
Views:
23
OK, Ahmad ... that may be a difference between C# and VB. It works fine with C#.

~~Bonnie


>Thanks Bonnie,
>I had to use "Is DBNull", because it's geving me an error on "!="
>
>
>
>>Ahmad,
>>
>>You need to test for a NULL value:
>>
>>if myDS.Tables("Company").Rows(iRow).Item("Note") != DBNull.Value then
>>  pbstrNotes = myDS.Tables("Company").Rows(iRow).Item("Note")
>>
>>
>>~~Bonnie
>>
>>>Dear All,
>>>I am trying to get a value from my DataSet and store it to the memvar as follow:
>>>
>>>Dim pbstrNotes As String
>>>pbstrNotes = myDS.Tables("Company").Rows(iRow).Item("Note")
>>>
>>>If the file empty the system reases an error # 13
>>>("DBNull" to type 'String' is not valid)
>>>
>>>Any idea how to sove this pls.
>>>
>>>Thanks for the help
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform