Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Checking for DBNull in DataTable
Message
From
19/03/2004 11:07:49
 
General information
Forum:
ASP.NET
Category:
ADO.NET
Miscellaneous
Thread ID:
00887448
Message ID:
00887931
Views:
10
Yep, although it should be noted that .IsDBNull() seems to be only for use with a DataReader.

~~Bonnie

>Oops... a little bug in the ointment... there should be quotes around the column name in the first line of the If:
>
>
>If drReader.IsDBNull("UserName") Then
>   txtUserName.Text = ""
>Else
>   txtUserName.Text = CStr(drReader("UserName"))
>End If
>
>
>
>Carl.
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Reply
Map
View

Click here to load this message in the networking platform