Hi FRANCESMACKENZIE-1253,
Thank you for posting here.
In order to detect a field is blank in the Dataset , you use the following code to do it.
For example.
If Not IsDBNull(ds.Tables("AddressBook").Rows(inc).Item(1)) Then
txtFirstName.Text = ds.Tables("AddressBook").Rows(inc).Item(1)
End If
Or
txtFirstName.Text = If(IsDbNull(ds.Tables("AddressBook").Rows(inc).Item(1)), String.Empty, ds.Tables("AddressBook").Rows(inc).Item(1).ToString)
Another quick way to fix it : just add 'ToString()' method at the end.
txtFirstName.Text = ds.Tables("AddressBook").Rows(inc).Item(1).ToString()
Hope them could be helpful.
Best Regards,
Xingyu Zhao
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.