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.<br>
<br>The observed behavior is equivalent to this bit of SQL.<br><br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">DECLARE @retval int, @someOut int<br>
exec @retval = uspReturnsAResultSetOrTwo @someOut OUTPUT<br>SELECT @retval, @someOut<br></blockquote><div><br>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 <a href="http://ADO.NET">ADO.NET</a>. 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?<br>
<br>Regards,<br>Michael Manfre<br></div>