UDFs and UDMs are visible through ODBC Catalog functions as shown in the following table. To get the meta data, the ODBC client application calls the referenced catalog function and looks at the result set:
Catalog Function | Description |
---|---|
SQLTables | Returns the value “TYPE” in the TABLE_TYPE column for user-defined types. The type name is returned in the TABLE_NAME column. |
SQLColumns | Returns the value SQL_UNKNOWN_TYPE (zero) in the DATA_TYPE for a UDT column. The UDT name is returned in the TYPE_NAME column. |
SQLProcedures | Returns names of user-defined methods in addition to names of macros, procedures, and user-defined functions. The value of the PROCEDURE_TYPE column for a user-defined method is SQL_PT_PROCEDURE. |
SQLProcedureColumns | Returns parameter information for user-defined methods. Also, parameter types might be UDTs and these are returned as for the SQLColumns catalog function (SQL_UNKNOWN_TYPE in DATA_TYPE column and UDT name in TYPE_NAME column). The output for TD_ANYTYPE parameters results in the value SQL_UNKNOWN_TYPE in the DATA_TYPE column and the string “TD_ANYTYPE” (without quotes) in the TYPE_NAME column. |