Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Strange BindingManagerBase problem

Status
Not open for further replies.

stemy

Programmer
Aug 25, 2001
39
IL
Hi
I have a problem with BindingManagerBase, and the strange thing is that it doesn't hapen all the time, so maybe someone knows what could trigger such a thing.
I'm iterating through the items of a BindingManagerBase object and searching for a specific item

Code:
bmb.Position = 0
while bmb.Position <> bmb.Count
  if bmb.Current.Row(&quot;Field1&quot;) = value
    return bmb.Current.Row
  End If
  bmb.Position += 1
End While
[code]

The problem that happens, is that after a few iterations, the line : &quot;bmb.Position += 1&quot; doesn't increment the Position property, although it hasn't reached to &quot;Count&quot; yet, and it gets stuck in an infinite loop. I ran it with a debugger and &quot;position&quot; simply doesn't case I incremented it and it keeps its old value. If anyone knows what could cause such a thing I will be greatfull.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top