The information in this article applies to:
SUMMARYThis article discusses how the Microsoft SQL Server ODBC Driver returns stored procedure return codes and output parameters to an ODBC application. SQL Server ODBC drivers from other vendors may do this differently; users should consult the documentation for the driver. MORE INFORMATION
SQL Server stored procedures can return both output parameters and return
codes to an application:
These can be bound to program variables in an ODBC application where the application can reference them. For example, to execute the procedure above using the ODBC CALL syntax and bind the return code and ouput parameters:
SQL Server does not send back the values for the return code or output parameters until the end of all result sets for the procedure. After SQLMoreResults() returns SQL_NO_DATA_FOUND, the program variable ProcRet will hold the return code of 99 and OParm will hold the output parameter value of 88. Additional query words: Fetch
Keywords : |
Last Reviewed: March 26, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |