Results 1 to 6 of 6

Thread: combining ADO recordsets

  1. #1
    Guest
    How can I combine two recordsets into 1 recordsets?

    The basic idea is that I run a stored proc, and if the results meet certain criteria, I want to run the stored proc again and add the new results to the original recordset.

    I know it would be easier to just modify the stored proc, but it is called by many apps and written in dynamic sql, which I am not comfortable playing with.

    Thank you in advance.

  2. #2
    PowerPoster Chris's Avatar
    Join Date
    Jan 99
    Location
    K-PAX
    Posts
    3,238

    Question

    How about LEFT/RIGHT JOIN SQL statement? Will it help?

  3. #3
    Guest
    I am trying to avoid changing the stored procedure.

    This is basically what I am trying to do:

    recordset1 = recordset1 & recordset2

    But & doesn't work with record sets

  4. #4
    Lively Member
    Join Date
    Mar 99
    Posts
    93
    You must use shaped recordset:
    SHAPE {Select * from Table1} as PrimaryRS
    APPEND ({Select * from Table2}
    RELATE Child_field TO Parent_field) as SecondaryRS
    Regards,
    Vit

  5. #5
    PowerPoster Chris's Avatar
    Join Date
    Jan 99
    Location
    K-PAX
    Posts
    3,238
    Hey! Vit, will the SHAPE, APPEND and RELATE work in MS Access database?


  6. #6
    Guest
    Thanks for all of the attempts at help. I decided I had to go ahead and alter the stored procedure, I was not able to find any information on combining record sets AFTER the record sets have been returned to the procedure calling the stored procedure.

Posting Permissions

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