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

Where clause for filter property of recordset (Help!)

Status
Not open for further replies.

link9

Programmer
Nov 28, 2000
3,387
US
Ok, I have a recordset that I want to store in a session variable that will be filtered several different ways from one call to the next, and so this is my first shot at using the filter property for an ADO Recordset.

Can anyone please post some syntax for the following statement if I wanted to filter by say 'region' and 'propertyCode' (two fields in the recordset)?
Code:
rs.filter = "(region = 2) or (propertyCode = 5)"

Please correct me, because I know the above statement causes an error. I have the recordset as a client-side cursor opened static (of course), and a lockType of adLockBatchOptimistic.

Ok, please help. Thanks!

Paul Prewett
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top