Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Detecting null value on Integer
Message
From
24/01/2016 04:57:39
 
 
To
23/01/2016 14:25:51
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
VB 9.0
OS:
Windows 8.1
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01630133
Message ID:
01630141
Views:
53
>I have this to detect a null value on a string:
>
>
>        ' If we have a value
>        If Not tcValue Is DBNull.Value Then
>            lcString = Trim(tcValue)
>        End If
>
>
>Using such an approach for an integer won't work because Is operator cannot be used against an integer.
>
>What would be an easier solution?

Are you confusing .NET data types with SqlDbType - DBNull.Value only applies to SQL types.... ?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform