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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TADOTable.locate bug

Status
Not open for further replies.

phatboi

Programmer
Apr 24, 2002
1
GB
Hi all

Have any of you found a workaround (or even the bug itself!) for the locate method in TADOTable? If you reduce the number of fields in the locate criteria in the code, the larger searches no longer work. Try this simple example. TADOConnection (Access2000), TADOTable, a source and a db grid to watch it, then 4 buttons which do something like

Button 1 - Tbl_Test.Locate('Field1;Field2',VarArrayOf([100,101]),[]);
Button 2 - Tbl_Test.Locate('Field1;Field2',VarArrayOf([200,201]),[]);
Button 3 - Tbl_Test.Locate('Field1',100,[]);
Button 4 - Tbl_Test.Locate('Field1',200,[]);

If you try the first two first, all works ok and the records are located. As soon as you perform a locate on just one field, subsequent locates on 2 fields fail. Eg, if you initially only click buttons 1 and 2, all will work OK. as soon as you click button 3 or 4, then buttons 1 and 2 stop working (although 3 and 4 continue to work OK)!

Is there any way to somehow reset the locate method?

Cheers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top