Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
INT field in Dataset
Message
General information
Forum:
ASP.NET
Category:
ADO.NET
Miscellaneous
Thread ID:
01377516
Message ID:
01377548
Views:
15
>>Yes, just do a direct cast to "int" instead of converting it to a string, then back into an int.
>>
>>Replace this:
>>
>>
>>int.Parse(dsx.Tables[0].Rows[0]["udfc1txtbxloc"].ToString())
>>
>>
>>With
>>
>>
>>(int) dsx.Tables[0].Rows[0]["udfc1txtbxloc"]
>>
>
>It may fail if the value returned is DbNull.Value

int.parse will probably also fail if there is a null in the table.
Semper ubi sub ubi.
Previous
Reply
Map
View

Click here to load this message in the networking platform