I have an ASP script, which pulls user input from a form and I need to query my Access 2000 database. I'm using FrontPage 2000 for development and my site server has the FrontPage Extensions installed.
Here's my question. Are you limited to a single SQL query to return a recordset or is it possible to sequence multiple SQL statements that will query the results of the preceeding statement. I'm dealing with plant material and my form has 22 different search possibilites such as botanic name, height, color, dry soil, etc. The ASP manual that I'm using implies that only one SQL statement can be used and that all of the search criteria needs to be contained in that single statement. The format described, which I have used successfully on other projects, is as follows:
Dim SQLQuery
SQLQuery = " a whole boatload of AND's OR's LIKE's for 22 search components "
objRS.Open SQLQuery, Connection, ...
What I have in mind, and I have no idea if it's possible, is this:
Dim SQLQuery
SQLQuery = "component 1 criteria"
objRS.Open SQLQuery, Connection, ...
SELECT * FROM objRS Where component 2 criteria
SELECT * FROM objRS Where component 3 criteria
and so on.
Can this be done or am I experiencing wishful thinking?
Thanks for your help.