I'm the maintainer of django-mssql and I've run in to an odd behavior when
trying to retrieve a stored procedure's output parameters. The parameters
(including return value) appear to only get fetched when the last recordset
for the stored procedure is loaded. This last recordset appears as if the
underlying layer is doing a select, and adding this extra recordset, for
the parameters.

The observed behavior is equivalent to this bit of SQL.

DECLARE @retval int, @someOut int
> exec @retval = uspReturnsAResultSetOrTwo @someOut OUTPUT
> SELECT @retval, @someOut
>

I haven't been able to find any documentation stating that this is the
intended behavior and this doesn't match my experience of using stored
procedures with ADO.NET. Is this expected behavior? Is there some
combination of cursor types or attributes to get the output parameter
values without fetching/skipping all the recordsets?

Regards,
Michael Manfre
_______________________________________________
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to