Callking Stored Proc from another Stored Proc

  • We have a simple proc that executes two oter procs (eg):

    CREATE PROCEDURE spCaller

    exec spOne

    exec spTwo

    GO

    It works OK, but returns 2 grids in Query Analyser. When we use spCaller in ASP and use the "for each item in rsTemp" command to enunciate the output, we get all the name/value pairs in the first grid (from spOne) but none of the output from spTwo. I'm not sure if this is an ASP question, or something to do with cascading Procs.

    Any ideas?

    Thanks

    Mike

  • You are returning two recordsets. QA displays each recordset in a separate result window in grid mode or both together in text mode. If you are using ADO with ASP then you need to move from the first recordset to the second by using the NextRecordset method and then looping through the items of the second recordset.

    i.e. set rs2 = rs.NextRecordset

    Far away is close at hand in the images of elsewhere.
    Anon.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply