ADODC find method

Geek.NET

New member
Joined
Jun 19, 2004
Messages
4
Programming Experience
1-3
hi...
what is the problem with this statements in VB.NET...I get an infinite loop



Private Sub ClearLabels() 'clear labels ifield n database MS-Access

If adoData.Recordset.BOF = False Then

adoData.Recordset.MoveFirst()

End If

adoData.Recordset.Find("fldIndicator='V'") 'find in this field any letter with 'V'

Do While Not adoData.Recordset.EOF

If txtIndicator.Text = "V" Then

adoData.Recordset.Delete()

adoData.Recordset.Update()

adoData.Recordset.MoveNext()

End If

Loop

End Sub

the statement adoData.Recordset.EOF will not evaluate into a true.
is there a problem with the find method...
plz help...thanx!
 
Move this statement:

adoData.Recordset.MoveNext()

outside of the If...EndIf.

In the future, try setting a breakpoint and then stepping through your code. You would see that the MoveNext is never executed.

Tony
 
Back
Top