The PROCEDURE_PARAMETERS rowset returns information about the parameters and return codes of procedures.
The PROCEDURE_PARAMETERS rowset contains the following columns.
Column name | Type indicator | Description |
PROCEDURE_CATALOG | DBTYPE_WSTR | Catalog name. NULL if the provider does not support catalogs. |
PROCEDURE_SCHEMA | DBTYPE_WSTR | Schema name. NULL if the provider does not support catalogs. |
PROCEDURE_NAME | DBTYPE_WSTR | Procedure name. |
PARAMETER_NAME | DBTYPE_WSTR | Parameter name. NULL if the parameter is not named. |
ORDINAL_POSITION | DBTYPE_UI2 | If the parameter is an input, input/output, or output parameter, this is the one-based ordinal position of the parameter in the procedure call. If the parameter is the return value, this is zero. |
PARAMETER_TYPE | DBTYPE_UI2 | One of the following: DBPARAMTYPE_INPUT—The parameter is an input parameter. DBPARAMTYPE_INPUTOUTPUT—The parameter is an input/output parameter. DBPARAMTYPE_OUTPUT—The parameter is an output parameter. DBPARAMTYPE_RETURNVALUE—The parameter is a procedure return value. For example, in the following ODBC SQL statement to call a procedure, the question mark marks a procedure return value:
If the provider cannot determine the parameter type, this is NULL. |
PARAMETER_ HASDEFAULT |
DBTYPE_BOOL | VARIANT_TRUE—The parameter has a default value. VARIANT_FALSE—The parameter does not have a default value or it is unknown whether the parameter has a default value. |
PARAMETER_DEFAULT | DBTYPE_WSTR | Default value of parameter. If the default value is the NULL value, COLUMN_HASDEFAULT is VARIANT_TRUE, and the COLUMN_DEFAULT column is a NULL value. |
IS_NULLABLE | DBTYPE_BOOL | VARIANT_TRUE—The parameter might be nullable. VARIANT_FALSE—The parameter is not nullable. |
DATA_TYPE | DBTYPE_UI2 | The indicator of the parameter's data type. For a list of valid type indicators, see "Type Indicators" in Appendix A. |
CHARACTER_MAXIMUM_ LENGTH |
DBTYPE_UI4 | The maximum possible length of a value in the parameter. For character, binary, or bit parameters, this is one of the following:
|
|
||
CHARACTER_OCTET_ LENGTH |
DBTYPE_UI4 | Maximum length in octets (bytes) of the parameter, if the type of the parameter is character or binary. A value of zero means the parameter has no maximum length. NULL for all other types of parameters. |
NUMERIC_PRECISION | DBTYPE_UI2 | If the parameter's data type is numeric, this is the maximum precision of the parameter. The precision of parameters with a data type of DBTYPE_DECIMAL or DBTYPE_NUMERIC depends on the definition of the parameters. For the precision of all other numeric data types, see "Precision of Numeric Data Types" in Appendix A. If the parameter's data type is not numeric, this is NULL. |
NUMERIC_SCALE | DBTYPE_I2 | If the column's type indicator is DBTYPE_DECIMAL or DBTYPE_NUMERIC, this is the number of digits to the right of the decimal point. Otherwise, this is NULL. |
DESCRIPTION | DBTYPE_WSTR | Human-readable description of the parameter. For example, the description of a parameter named Name in a procedure that adds a new employee might be "Employee name." |
TYPE_NAME | DBTYPE_WSTR | Provider-specific data type name. This column is not returned by 1.x providers. |
LOCAL_TYPE_NAME | DBTYPE_WSTR | Localized version of TYPE_NAME. NULL is returned if a localized name is not supported by the data provider. This column is not returned by 1.x providers. |
Default Sort Order: PROCEDURE_CATALOG, PROCEDURE_SCHEMA, PROCEDURE_NAME