Returns the list of input and output parameters, as well as the columns that make up the result set for the specified procedures. The information is returned as a result set on the specified statement.
hstmnt = DB_ProcedureColumns (hdbc, catalog-name, schema-name, proc-name, column-name)
Variable | Description |
---|---|
hstmnt |
The returned handle to the executed SQL statement. This is an input parameter for other DBTester functions, for example DB_FetchNext. HSQL. |
hdbc |
The handle to a database as returned by DB_Connect. HDATABASE. |
catalog-name |
Catalog name. STRING. |
schema-name |
String search pattern for schema names. STRING. |
proc-name |
String search pattern for procedure names. STRING. |
column-name |
String search pattern for column names. STRING. |
DB_ProcedureColumns corresponds to SQLProcedureColumns. For additional information about SQLProcedureColumns, see SQLProcedureColumns Function.
The catalog-name argument cannot contain a wildcard.
Wildcard character | Matches |
---|---|
% | The percent sign matches any character sequence. |
_ | The underscore matches any single character. |
To omit a variable argument, which is not a required argument, specify the argument as an empty string ("").
When you receive a valid statement handle, you can call DB_FetchNext or DB_FetchPrevious to manipulate the information.
[ ] STRING cat, sch, proc, col,ignore, proc-name, proc-col [ ] hstmnt = DB_ProcedureColumns (hdbc, cat, sch,"","") [ ] // { retrieve procedure and procedure column names; ignore the rest. [-] while (DB_FetchNext (hstmt, ignore, ignore, proc-name, proc-col) == TRUE) { [ ] //print procedure and procedure column names ... [-] }