Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Check the field exist in myReader
Message
De
20/12/2007 00:38:22
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, États-Unis
 
 
À
19/12/2007 21:52:29
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
01276746
Message ID:
01276755
Vues:
18
>pKcno = myReader.Item("kcno") <--it will return error when the field "kcno" doesn't exist
>
>any method to check the field exist or not first , if not exist, I want to skip the above statement.
>
>Thanks

I don't have the IDE handy, but can you do something like so:
If myReader.Item("kcno") IsNot Nothing Then
    pKcno = myReader.Item("kcno")
EndIf
This is assuming myReader.Item("kcno") = Nothing if the field does not exist.
Very fitting: http://xkcd.com/386/
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform