16.10.6 SQLProcedures, SQLProceduresW
- Organization of this subsection
(1) Function
This ODBC function returns a list of procedures stored at the data source. 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 SQLProcedures
SQLRETURN SQLProcedures ( SQLHSTMT StatementHandle, /* In */ SQLCHAR * CatalogName, /* In */ SQLSMALLINT NameLength1, /* In */ SQLCHAR * SchemaName, /* In */ SQLSMALLINT NameLength2, /* In */ SQLCHAR * ProcName, /* In */ SQLSMALLINT NameLength3 /* In */ )
-
For SQLProceduresW
SQLRETURN SQLProceduresW ( SQLHSTMT StatementHandle, /* In */ SQLWCHAR * CatalogName, /* In */ SQLSMALLINT NameLength1, /* In */ SQLWCHAR * SchemaName, /* In */ SQLSMALLINT NameLength2, /* In */ SQLWCHAR * ProcName, /* In */ SQLSMALLINT NameLength3 /* 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.
- #
-
The length must be in bytes for SQLProcedures and in characters for SQLProceduresW.
(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 |
|
HY013 |
Memory management error |
N |
|
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