Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Jan 2003
    Posts
    65
    Thanks
    0
    Thanked 0 Times in 0 Posts

    using multiple SQL queries to retrieve multiple recordsets from Access database

    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
    Attached Files Attached Files

  • #2
    Senior Coder A1ien51's Avatar
    Join Date
    Jun 2002
    Location
    Between DC and Baltimore In a Cave
    Posts
    2,717
    Thanks
    1
    Thanked 94 Times in 88 Posts
    How are you writing the information out??
    Tech Author [Ajax In Action, JavaScript: Visual Blueprint]

  • #3
    New Coder
    Join Date
    Jan 2003
    Posts
    65
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •