franklin83
New member
- Joined
- Dec 5, 2008
- Messages
- 2
- Programming Experience
- 1-3
Hi, i'm new in the forum, and I searched for threads to solve my problem, but cant find something useful.
My problem is that when I'm reading the results of batch Transact-SQL statements with the nextResult() method the next while to read the second result dont work, it has no records. Thanks for the help. And sorry for my english.
My problem is that when I'm reading the results of batch Transact-SQL statements with the nextResult() method the next while to read the second result dont work, it has no records. Thanks for the help. And sorry for my english.
VB.NET:
While dr.Read
strName = dr("ContactID") & ", " & dr("FullName") '& ", " & dr("Phone")
ListBox1.Items.Add(strName)
End While
[B][COLOR="Blue"]dr.NextResult()[/COLOR][/B] [COLOR="YellowGreen"]'This is true[/COLOR]
[B][COLOR="Red"]While dr.Read[/COLOR][/B] [COLOR="YellowGreen"]'But this is false[/COLOR]
strName = dr("ContactID") & ", " & dr("FullName") '& ", " & dr("Email")
CheckedListBox1.Items.Add(strName)
End While