i’m updating some VB6 code to .NET and have come across a small problem. i’m basically in an infinite loop because i don’t know the .NET equivalent of RecordSet.MoveNext() (VB6). i’ve updated the use of a RecordSet with a DataSet
While Not _sqlADP.Fill(_dataSet) = 0
// code
// more code
// original VB6 code had _recordSET.MoveNext() here.
End While
how do i check for EOF here and exit the loop?
I believe you’d use something like the following:
You might also want to consider using a DataReader, which is probably more analogous to the VB6 RecordSet, as I believe the ADO RecordSet has read-only, forward-only behavior by default. If you were using a DataReader your loop would look like: