Last active
August 18, 2019 23:19
-
-
Save facebookegypt/48e2d68f8917a23dc03e46084107056b to your computer and use it in GitHub Desktop.
Conversion from type 'DBNull' to type 'String' is not valid.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'adonetaccess2003.blogspot.com | |
'This method uses connected mode | |
If IsDBNull(DataReader!Field_Name) Then | |
TextBox1.Text = ("Anything you wish for now") | |
Exit Sub | |
End If | |
'Another method using disconnected mode 'DataSet' | |
TextBox1.Text = DataTable.Rows(0)("Field_Name").ToString() | |
'Another method from Database Table. | |
Dim SqlStr As String = "select IsNull(Field_Name,'') as Any_Name from Table_Name" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment