G
Guest
I want to pull 2 different recordsets using 2 different stored
procedures using the same Data Connection. Below is the code that I
currently have, but I'm getting an 'Object Required' error message. Am
I doing this correctly, or at least headed in the right direction? Can
someone tell me the most efficient way (provide a code example) to pull
2 different recordsets from the same Data Connection?
Set dConn = Server.CreateObject("ADODB.Connection")
dConn.Open Application("Some_ConnectionString")
set rsStats = Server.CreateObject("ADODB.recordset")
rsStats = dConn.Execute("exec sp_ReturnSomeRecords " & _
"@Month='" & StatMonth & "'," & _
"@Year='" & StatYear & "'")
set rsMonthTotal = Server.CreateObject("ADODB.recordset")
rsMonthTotal = dConn.Execute("exec sp_ReturnRecordsFromAnotherTbl " & _
"@Month='" & StatMonth & "'," & _
"@Year='" & StatYear & "'")
Thanks in advance!!
procedures using the same Data Connection. Below is the code that I
currently have, but I'm getting an 'Object Required' error message. Am
I doing this correctly, or at least headed in the right direction? Can
someone tell me the most efficient way (provide a code example) to pull
2 different recordsets from the same Data Connection?
Set dConn = Server.CreateObject("ADODB.Connection")
dConn.Open Application("Some_ConnectionString")
set rsStats = Server.CreateObject("ADODB.recordset")
rsStats = dConn.Execute("exec sp_ReturnSomeRecords " & _
"@Month='" & StatMonth & "'," & _
"@Year='" & StatYear & "'")
set rsMonthTotal = Server.CreateObject("ADODB.recordset")
rsMonthTotal = dConn.Execute("exec sp_ReturnRecordsFromAnotherTbl " & _
"@Month='" & StatMonth & "'," & _
"@Year='" & StatYear & "'")
Thanks in advance!!