3

I have simple SQL stored procedure with several SELECT statements in it and want to extract this information like this:

Set cmd = Server.CreateObject("ADODB.command")
cmd.CommandType = adCmdStoredProc
cmd.CommandText = "MyStoreProcedure"
cmd.ActiveConnection = objConnection
cmd.NamedParameters = True

cmd.Parameters.Append ...
cmd.Parameters.Append ...

Set rs = cmd.Execute()

How can I iterated over the rowsets in classic asp?

gotqn
  • 42,737
  • 46
  • 157
  • 243
  • 3
    Your sp is return multiply rowsets? If yes - you can use `NextRecordset` method. – VMV Jun 06 '13 at 08:07
  • 2
    @VMV You can paste your comment as a answer and maybe link to the method in order to accept it and close the issue. – gotqn Jun 08 '13 at 08:25

1 Answers1

3

You need use NextRecordset method, see description here http://msdn.microsoft.com/en-us/library/windows/desktop/ms677539(v=vs.85).aspx

VMV
  • 576
  • 4
  • 6