Problem with recordset.find

soguy
06-07-2002, 12:46 AM
Hi to all,

I use ADO with Access and have a table with 2 fields: a number (book_id) and a string (id).
When trying to use the Recordset.Find method, I get the 3001 runtime error (Image file is attached).

I'm using this line:

Lends.Recordset.Find ("id='18454846' and book_id=557")

Please help me ...

Can't I use two different field type?

Thanks,

Guy.

joe77s
06-07-2002, 12:56 AM
Only a single-column name may be specified in criteria. This method does not support multi-column searches.

you can use 'filter' to search more than one criteria

soguy
06-07-2002, 02:07 AM
Thanks

simondeutsch
06-10-2002, 08:32 PM
If your recordset supports indexes (try ?rs.supports(adindex)) then you can use the recordset.seek method which allows multicolumn searching. You define the index to use. Find only allows single column searching. Seek uses an array of column names, and an array of corresponding values to seek for. Using Filter isn't bad, but it's heavy for continuous searching, you must reset the filter to an empty string each time you want to search again, and seek is very fast.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum