Re: OUTPUT Params and RecordSet Problem



INTP56 wrote:
I'm trying to call a procedure that has OUTPUT params and returns a
record set. In Excel 2003 VBA (Microsoft ActiveX Data Objects 2.8
Library), I seem to only be able to get one or the other.


You have to consume all resultsets BEFORE attempting to read output or
return parameters. So, once you move to the last record in the
recordset, or close it, you should be able to read the output parameter
value. It's a pretty good argument for using GetRows to put your data
into an array, allowing you to close your recordset immediately.

There is no workaround. That's the way SQL Server works: resultsets must
be completely sent to the client before output and return parameters are
sent.

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.


.



Relevant Pages