|
-
Jan 14th, 2003, 02:22 PM
#1
Thread Starter
Lively Member
how to handle a datareader with no records..
I am using a datareader and its returning no records and I want to know how to handle that.
Example:
If not IsDbNull(dr("field1")) Then
listbox1.Items.FindByValue(CType(dr("field1"), string).Selected = True
End If
Error:
Invalid attempt to Read when no data is present.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|