16.10.5 SQLProcedureColumns, SQLProcedureColumnsW
- Organization of this subsection
(1) Function
This ODBC function returns a list of input and output parameters and a list of columns that make up the result set for a specified procedure. The driver returns the information as a result set for the specified SQL statement.
Note that the number of rows in the retrieval result set is always 0 because the driver does not support procedures.
(2) Format
-
For SQLProcedureColumns
SQLRETURN SQLProcedureColumns ( SQLHSTMT StatementHandle, /* In */ SQLCHAR * CatalogName, /* In */ SQLSMALLINT NameLength1, /* In */ SQLCHAR * SchemaName, /* In */ SQLSMALLINT NameLength2, /* In */ SQLCHAR * ProcName, /* In */ SQLSMALLINT NameLength3, /* In */ SQLCHAR * ColumnName, /* In */ SQLSMALLINT NameLength4 /* In */ )
-
For SQLProcedureColumnsW
SQLRETURN SQLProcedureColumnsW ( SQLHSTMT StatementHandle, /* In */ SQLWCHAR * CatalogName, /* In */ SQLSMALLINT NameLength1, /* In */ SQLWCHAR * SchemaName, /* In */ SQLSMALLINT NameLength2, /* In */ SQLWCHAR * ProcName, /* In */ SQLSMALLINT NameLength3, /* In */ SQLWCHAR * ColumnName, /* In */ SQLSMALLINT NameLength4 /* In */ )
(3) Arguments
- StatementHandle
-
Specifies a statement handle.
Specify a value that was output by *OutputHandlePtr of SQLAllocHandle before this function is executed.
- CatalogName
-
Specifies a procedure catalog name.
- NameLength1
-
Specifies the length# of *CatalogName.
- SchemaName
-
Specifies a pattern character string for procedure schema names.
- NameLength2
-
Specifies the length# of *SchemaName.
- ProcName
-
Specifies a pattern character string for procedure names.
- NameLength3
-
Specifies the length# of *ProcName.
- ColumnName
-
Specifies a pattern character string for column names.
- NameLength4
-
Specifies the length# of *ColumnName.
- #
-
The length must be in bytes for SQLProcedureColumns and in characters for SQLProcedureColumnsW.
(4) Return value
This ODBC function returns SQL_SUCCESS, SQL_ERROR, or SQL_INVALID_HANDLE.
(5) SQLSTATE
This ODBC function returns one of the following SQLSTATE values:
SQLSTATE |
Description |
Remarks |
Returned |
---|---|---|---|
01000 |
General warning |
-- |
N |
08S01 |
Communication link failure |
N |
|
24000 |
Invalid cursor status |
The function was executed while a cursor was open. |
Y |
40001 |
Serialization failure |
-- |
N |
40003 |
Statement completion unknown |
N |
|
HY000 |
General error |
N |
|
HY001 |
Memory allocation error |
Y |
|
HY008 |
Operation cancelled |
N |
|
HY009 |
Invalid use of null pointer |
N |
|
HY010 |
Function sequence error |
Y |
|
HY090 |
Invalid string or buffer length |
N |
|
HY117 |
Connection suspended |
N |
|
HYC00 |
Optional feature not implemented |
N |
|
HYT00 |
Timeout expired |
N |
|
HYT01 |
Connection timeout expired |
N |
|
IM001 |
Driver does not support this function |
N |
|
IM017 |
Invalid asynchronous polling |
N |
|
IM018 |
Incomplete asynchronous execution |
N |
- Legend:
-
Y: This SQLSTATE might be returned by the HADB ODBC driver.
N: This SQLSTATE is not returned by the HADB ODBC driver.
--: None