Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Checking for DBNull in DataTable
Message
 
To
18/03/2004 19:51:02
General information
Forum:
ASP.NET
Category:
ADO.NET
Miscellaneous
Thread ID:
00887448
Message ID:
00887757
Views:
9
Just to add a little quirkiness here... You can also use IsDBNull.

For example, if you have a datareader, you could do something like:
If drReader.IsDBNull(UserName) Then
   txtUserName.Text = ""
Else
   txtUserName.Text = CStr(drReader("UserName"))
End If
Ciao,
Carl.
Carl Olson, Jr.
CEO, Founder
Cerelogic, Inc.

www.cerelogic.com

"Applying rocket science to business."
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform