The information in this article applies to:
SYMPTOMSWhen calling a stored procedure on SQL Server 6.5 using the ActiveX Data Objects (ADO) Command.Execute method, output parameters are not returned. CAUSE
The current version of the SQL Server ODBC driver (2.65.0240) returns
output parameters as the last packet it sends back to the client. The ODBC
driver is implemented such that an application must process through all of
the result sets returned by the procedure before the output parameters are
filled. For more information, please see the following article in the Microsoft Knowledge Base: Q152174 INFO: Output Parameters, Return Codes and the ODBC Driver RESOLUTION
If you are using Visual Basic and you are receiving a recordset back from
the Execute call, set the recordset to "Nothing" and then retrieve the
results of the output parameters. Here is a Visual Basic example of what
the code might look like:
NOTE: Assigning a recordset to the return value of Com1.Execute() is optional. The query could be an action query, and not return records. If not, VBA releases the returned recordset automatically if no assignment is performed. In Visual C++, you must call Release() on the returned recordset before the values of the Parameters collection are queried. Here is an example of what the code would look like if you are using #import to manipulate ADO:
STATUSThis behavior is by design. Additional query words: kbdse
Keywords : kbnokeyword kbADO kbVBp kbVC kbVJ kbGrpMDAC kbIIS |
Last Reviewed: November 8, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |