Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Executereader has no records
Message
From
27/06/2011 18:06:14
 
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Miscellaneous
Thread ID:
01501091
Message ID:
01516380
Views:
34
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform