[python-win32] adodbapi and stored procedure output parameters on

Randy Syring randy at rcs-comp.com
Wed May 27 15:16:37 CEST 2009

Roger Upole wrote:
> I've run into this somewhere before.  It turns out that the output 
> parms are
> actually returned as an extra recordset, so you need to call 
> NextRecordset
> before trying to access them.
>> From digging into the source, if you add
> rs.NextRecordset() at line 741 of adodbapi.py, the output parm
> is returned as expected.
>           Roger

Yes, but if you try to get data from the recordsets, it breaks other things.

ADO is what creates the the extra select at the end of the SQL that is 
generated and therefore the last recordset.  Shouldn't it pull that last 
recordset off to populate the output parameters?  If we do have to run 
through all recordsets before ADO will properly populate the output 
values (which I have tried and not been able to get working), then its 
going to be difficult for adodbapi to work correctly.  Its supposed to 
return the output parameters immediately after executing callproc(), but 
it can't do that because the recordsets haven't been processed yet.

Randy Syring
RCS Computers & Web Solutions

"Whether, then, you eat or drink or 
whatever you do, do all to the glory
of God." 1 Cor 10:31

More information about the python-win32 mailing list