Re: How set adodb.recordset.filter to a list of long for a long type f

From: Stephen Howe (stephenPOINThoweATtns-globalPOINTcom)
Date: 02/22/05


Date: Tue, 22 Feb 2005 20:25:47 -0000


> How should the filter be set for a long data type field, which filter is a
> list of long?
> sample: productid field in the recordset is long, the recordset contain
all
> productid items. I only need part of the results: productid in
(1,20,34,45)
> for sample.

Try

"productid = 1 or productid = 20 or productid = 34 or productid = 45"

The point about filter is that it is _REALLY_ simple. It does not support
anything like the SQL WHERE clause functionality. If your requirments are
simple, then Recordset Filter is fine. But if your requirments are complex,
you should not be trying to use Recordset Filter.
It is a mistake for programmers to try and make a really simple facility to
do complex things.
A redesign is necesssary. In general the SQL WHERE clause is considerably
better.

Stephen Howe



Relevant Pages