...

View Full Version : using multiple SQL queries to retrieve multiple recordsets from Access database



petela
11-07-2003, 11:07 PM
Hi,

I have a form on a website which is comprised of 3 drop-down lists. As per standard procedure, the form is processed via an asp page which is connected to an ACCESS database, I want to run two different sets of code, depending on on whether "paid" or "unpaid" was sent to the ASP page via the form. I created the SQL statement for the "paid" case, created some code, and closed the recordset and the database connection.

I created a new SQL statement for the "unpaid" case, created some different code, and closed out the recordset and database connection. The results which are displayed relate to the first SQL statment only.

If I set the WHERE clause in the first SQL statement to include "paid", it retrieves that information from the database, and does not even look at the second SQL statement. If I set the WHERE clause in the first SQL statement to include "notpaid", it retrieves that information from the database, but again, it completely ignores the second SQL statement.

I believe there is a simple solution to this problem, but I am not seeing it at this time. I have attached the file in question. Thanks in advance for your help.

Sincerely,
Pete Layshock

A1ien51
11-08-2003, 02:17 PM
How are you writing the information out??

petela
11-10-2003, 03:42 PM
My Response.Write statements will depend on the recordset retrieved from the SQL SELECT statement. I'm thinking that I might need to go use the two SELECT statements in conjunction with "SELECT CASE".

Thanks



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum