ADO Recordest.Filter "NOT LIKE"

M

miromirc

Dear colleagues,

Is there any way to filter ADO Recordest using criteria "[SomeColumn]
NOT LIKE 'SomeExpresion'". I don't mean "NOT LIKE" criteria within SQL
statement used in Recordset.Open(that's work correctly), but in context
Recordset.Filter = "[SomeColumn] NOT LIKE 'SomeExpresion'".
Wider context: I need to obtain the index(-es) - row position
value(-s) of row(-s) within some data table, which satisfy some
multiple column criteria, including also "NOT LIKE" criteria. The data
source table is located in Excel Worksheet, and it doesn't contain
"Primary Key" - index column(row unique identifyer).
I will appreciate any help regarding this issue.
Thank You in advance. Regards. Mirom.
 
K

K Dales

Unfortunately (at least according to the ADO documentation) you cannot use a
Not operator in a Recordset Filter. I assume you have tried this and found
it does not work (thus the reason for your post). It is a shame, since it
would indeed be useful and it is mystifying to me why it was not implemented.

There may be ways to use other filter clauses to get the results you want
but that would depend on the specific pattern of characters you are trying to
check against.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top