Below is an example of some logic I am using in my app and found it was not cycling through all of the records. Unless I execute the BO.MoveFirst() method before the do loop, it does not cycle through all of the records . Why do I have to execute the .MoveFirst method to use this logic? Would it be better to use .GetEnumerable method of the BO instead?
Thanks Guys,
Jeff
Using lo As New DepartmentsBO
lo.FillDataTable("SELECT * FROM CMPRDepartments")
lo.MoveFirst()
Debug.Print(count &
We just use GetEnumerable once we found out about it and refactored all old code. Prior to that we did (without any problems):
If BO.MoveFirst() Then Do
Loop While BO.MoveNext() End If
This code is better as I believe your example will error if the BO is empty on the MoveFirst.
Cheers, Peter