Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DBNull, Error 13
Message
De
13/01/2003 13:14:48
 
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00741053
Message ID:
00741087
Vues:
24
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform