SQLProcedureColumns returns one row reporting the return value attributes of all SQL Server stored procedures.
SQLProcedureColumns returns SQL_SUCCESS whether or not values exist for CatalogName, SchemaName, ProcName, or ColumnName parameters. SQLFetch returns SQL_NO_DATA when invalid values are used in these parameters.
SQLProcedureColumns can be executed on a static server cursor. An attempt to execute SQLProcedureColumns on an updatable (dynamic or keyset) cursor will return SQL_SUCCESS_WITH_INFO indicating that the cursor type has been changed.
The following table lists the columns returned by the result set and how they have been extended to handle the udt and xml data types through the SQL Server Native Client ODBC driver:
Returns the name of the catalog containing the UDT (user-defined type).
Returns the name of the schema containing the UDT.
Returns the assembly-qualified name of the UDT.
Returns the name of the catalog where an XML schema collection name is defined. If the catalog name cannot be found, then this variable contains an empty string.
Returns the name of the schema where an XML schema collection name is defined. If the schema name cannot be found, then this variable contains an empty string.
Returns the name of an XML schema collection. If the name cannot be found, then this variable contains an empty string.
SQLProcedureColumns handles table-valued parameters in a manner similar to CLR user-defined types. In rows returned for table-valued parameters, columns have the following values:
The name of the table type for the table-valued parameter.
The number of columns in the table-valued parameter.
NULL. Table types might not have default values.
Returns the name of the catalog that contains the table or CLR user-defined type.
Returns the name of the schema that contains the table or CLR user-defined type.
The SS_TYPE_CATALOG_NAME and SS_TYPE_SCHEMA_NAME columns were introduced in SQL Server 2008 to return the catalog and schema, respectively, for table-valued parameters. These columns are populated for table-valued parameters, and also for CLR user-defined type parameters. (Existing schema and catalog columns for CLR user-defined type parameters are not affected by this additional functionality. They are also populated to maintain backward compatibility).
In conformance with the ODBC specification, SS_TYPE_CATALOG_NAME and SS_TYPE_SCHEMA_NAME appear before all driver-specific columns added in previous versions of SQL Server, and after all columns mandated by ODBC itself.
For more information about table-valued parameters, see Table-Valued Parameters (ODBC).
SQLProcedureColumns supports large CLR user-defined types (UDTs). For more information, see Large CLR User-Defined Types (ODBC).