PROCEDURE_PARAMETERS Rowset

GUID: DBSCHEMA_PROCEDURE_PARAMETERS

Number of restriction columns: 4

Restriction columns: PROCEDURE_CATALOG, PROCEDURE_SCHEMA, PROCEDURE_NAME, PARAMETER_NAME

Default sort order: PROCEDURE_CATALOG, PROCEDURE_SCHEMA, PROCEDURE_NAME

Description: The PROCEDURE_PARAMETERS rowset returns information about the parameters and return codes of procedures.

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:

{? = call GetNextOrderID}

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 (x86)

DBTYPE_UI8 (x64)

The maximum possible length of a value in the parameter. For character, binary, or bit parameters, this is one of the following:

  • The maximum length of the parameter in characters, bytes, or bits, respectively, if one is defined. For example, a CHAR(5) parameter has a maximum length of five (5).

  • The maximum length of the data type in characters, bytes, or bits, respectively, if the parameter does not have a defined length.

  • Zero (0) if neither the parameter nor the data type has a defined maximum length.

NULL for all other types of parameters.

CHARACTER_OCTET_LENGTH

DBTYPE_UI4 (x86)

DBTYPE_UI8 (x64)

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 of a numeric data type other than VARNUMERIC, 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 or is VARNUMERIC, this is NULL.

NUMERIC_SCALE

DBTYPE_I2

If the column's type indicator is DBTYPE_DECIMAL, DBTYPE_NUMERIC, or DBTYPE_VARNUMERIC, 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.