Click to See Complete Forum and Search --> : Seek/Find methods


Kathy
November 29th, 1999, 02:54 PM
Hi ,

I have trouble using the "Find" method for ADO;
If Employees table has one-field Index : LastName, then this statement will
work fine :
strSearch = "LastName = 'ABC' "
DataEnvironment1.rsEmployee.Find strSearch

But if Employees table has mutiple-field index : LastName & FirstName,
then I am stuck:
strSearch = "LastName = 'ABC' , AND FirstName = 'DEF' "
DataEnvironment1.rsEmployee.Find strSearch

---> The error message I've got is:
"The application is using arguments that are of the wrong type ,
are out of acceptable range or are in conflict with one another"

Please help me out.
Thanks

November 29th, 1999, 03:46 PM
You could have that error in case if your record contains single quote, for example Last Name is "O'Bryan".
Vlad

Kathy
November 29th, 1999, 03:51 PM
Not really, My data does not have any quotes.
I even tried to "find" on Fields of number format (EmployeeID....),
but still

Lothar Haensler
November 30th, 1999, 01:54 AM
read MSDN article Q195222.
it states that ADO find method only supports one criteria!
it also gives you a few workarounds like using Filters.