Creating multiple Record Sets

Results 1 to 3 of 3

Thread: Creating multiple Record Sets

  1. #1
    Join Date
    Dec 1969
    Posts
    1,013

    Default Creating multiple Record Sets

    Hello, <BR>I have an Access Database and I&#039m trying in ASP/SQL to create two Drop-Down menus from two different fields from the database. I also want the values of the Drop-Down menus to be distinct. It appears that you can only create a query with one Distinct command -- "SELECT DISTINCT Column FROM Table". How can you via SQL create two record sets in one ASP document? Any assistance would be greatly appreciated.<BR>Thank you,<BR>Chris

  2. #2
    Join Date
    Dec 1969
    Posts
    1,013

    Default RE: Creating multiple Record Sets

    Forget It. I just found out that you can&#039t create multiple recordsets using Access, must use SQL Server.

  3. #3
    Richard L. Guest

    Default RE: Creating multiple Record Sets

    Hi Chris,<BR><BR>You can either open two recordsets:<BR><BR>objConn.Open "DSN=myDSN"<BR>rs1.Open "SELECT * FROM tableName", objConn<BR>rs2.Open "SELECT * FROM table2", objConn<BR><BR>OR you can embed two SQL statements in one string and use the NextRecordset method to move to the second when you&#039re finished with the first. Separate the two statements with a ;<BR><BR>rs.Open "SELECT * FROM tableName; SELECT * FROM table2", objConn<BR><BR>&#039 USE DATA FROM 1ST QUERY HERE.<BR><BR>rs.NextRecordset<BR><BR>&#039 USE DATA FROM 2ND QUERY HERE.<BR><BR>That should do it.

Posting Permissions

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