Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Executereader has no records
Message
De
27/06/2011 18:06:14
 
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Divers
Thread ID:
01501091
Message ID:
01516380
Vues:
36
Hi Gerard,

You will probably have success with using TryParse rather than Convert:
Dim x As Integer
Integer.TryParse(rdrCount("CALLS").ToString, x)
The TryParse() method returns a boolean value, which you could also test. What I showed above will work just fine also. The integer x will be zero if it could not parse the string (so, if the string was null or empty).

I hope the online converter that I used worked correctly though. The integer parameter in the TryParse() method is an "out" parameter in C# ... the converters didn't translate that at all to VB code. But, anyway, see if that helps.

~~Bonnie
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