The following rules apply to the input and output arguments submitted with the SQL CALL statement in ODBC:
Argument |
Condition |
A value expression |
Must not contain colon-preceded identifiers. It must be a constant expression. The value of the expression is treated as the input value for the corresponding parameter in the called stored procedure. A NULL value expression can be used to initialize the corresponding parameter to NULL. |
? |
The value for the corresponding IN or INOUT parameter of the called procedure must be set using ODBC-specific calls prior to calling the stored procedure. |
If the OutputAsResultSet option is set to Y, the values of INOUT and OUT parameters can be retrieved from the bound buffers after a SQLFetch API call, or using the SQLBindCol ODBC SDK API followed by SQLFetch API call.
If the OutputAsResultSet option is set to N, the values of INOUT and OUT parameters are updated automatically.
Note: Using the OutputAsResultSet option is not recommended, because it is deprecated. For details, see “DSN Option to Return Output Parameters as ResultSet” on page 165.
For the other rules and details governing the CALL statement and usage of stored procedure parameters, refer to SQL Stored Procedures and Embedded SQL.