16.16 Attributes that can be specified in SQLSetStmtAttr, SQLSetStmtAttrW, SQLGetStmtAttr, and SQLGetStmtAttrW
The following table lists and describes the attributes that can be specified in SQLSetStmtAttr, SQLSetStmtAttrW, SQLGetStmtAttr, and SQLGetStmtAttrW.
No. |
Attribute |
Description (convention) |
Support status |
Data type |
---|---|---|---|---|
1 |
SQL_ATTR_APP_PARAM_DESC |
The handle to the APD that can be used for the next call to SQLExecute, SQLExecDirect, or SQLExecDirectW. The value is one of the following:
|
Supports the following values:
|
SQLHDESC |
2 |
SQL_ATTR_APP_ROW_DESC |
The handle to the ARD that can be used for the next fetch. The value is one of the following:
|
Supports the following values:
|
SQLHDESC |
3 |
SQL_ATTR_ASYNC_ENABLE |
Whether a function called with the statement handle specified in StatementHandle of this function as an argument is to be executed asynchronously.
|
Supports the following value:
|
SQLULEN |
4 |
SQL_ATTR_CONCURRENCY |
Specification on cursor concurrency.
|
Supports the following value:
If a value other than SQL_CONCUR_READ_ONLY is set, the HADB ODBC driver rewrites the value to SQL_CONCUR_READ_ONLY, and then returns SQL_SUCCESS_WITH_INFO. |
SQLULEN |
5 |
SQL_ATTR_CURSOR_SCROLLABLE |
The level of support that the application requires.
|
Supports the following value:
If a value other than SQL_NONSCROLLABLE is set, the HADB ODBC driver rewrites the value to SQL_NONSCROLLABLE, and then returns SQL_SUCCESS_WITH_INFO. |
SQLULEN |
6 |
SQL_ATTR_CURSOR_SENSITIVITY |
Whether cursors on the statement handle detect changes made to a result set by another cursor.
|
Supports the following value:
If a value other than SQL_UNSPECIFIED is set, the HADB ODBC driver rewrites the value to SQL_UNSPECIFIED, and then returns SQL_SUCCESS_WITH_INFO. |
SQLULEN |
7 |
SQL_ATTR_CURSOR_TYPE |
Cursor type.
|
Supports the following value:
If a value other than SQL_CURSOR_FORWARD_ONLY is set, the HADB ODBC driver rewrites the value to SQL_CURSOR_FORWARD_ONLY, and then returns SQL_SUCCESS_WITH_INFO. |
SQLULEN |
8 |
SQL_ATTR_ENABLE_AUTO_IPD |
Whether the IPD value is set automatically. |
This attribute is not supported. |
-- |
9 |
SQL_ATTR_FETCH_BOOKMARK_PTR |
Pointer to a binary bookmark value. |
This attribute is not supported. |
-- |
10 |
SQL_ATTR_IMP_PARAM_DESC |
Handle to the IPD that is allocated the first time the statement handle is allocated. |
Supports the following value:
|
SQLHDESC |
11 |
SQL_ATTR_IMP_ROW_DESC |
Handle to the IRD that is allocated the first time the statement handle is allocated. |
Supports the following value:
|
SQLHDESC |
12 |
SQL_ATTR_KEYSET_SIZE |
Number of rows in the keyset for a keyset cursor. |
This attribute is not supported. |
-- |
13 |
SQL_ATTR_MAX_LENGTH |
Maximum size of data for a character string column or binary column during communication between data sources (between server and host).
|
Supports the following value:
|
SQLULEN |
14 |
SQL_ATTR_MAX_ROWS |
Maximum number of rows that is returned to a SELECT statement during communication between data sources (between server and host).
|
Supports the following value:
|
SQLULEN |
15 |
SQL_ATTR_METADATA_ID |
How to handle character string arguments of catalog functions.
|
Supports the following value:
|
SQLULEN |
16 |
SQL_ATTR_NOSCAN |
Whether the driver performs syntax analysis on escape sequences and converts them to a DBMS-specific syntax.
|
Supports the following value:
|
SQLULEN |
17 |
SQL_ATTR_PARAM_BIND_OFFSET_PTR |
A pointer to the offset that is added to the pointer used when dynamic parameters are bound.
|
Supports the following value:
|
SQLULEN * |
18 |
SQL_ATTR_PARAM_BIND_TYPE |
Binding orientation to be used for dynamic parameters.
|
Supports the following value:
|
SQLULEN |
19 |
SQL_ATTR_PARAM_OPERATION_PTR |
An array used to ignore parameters during execution of an SQL statement.
|
Supports the following value:
|
SQLUSMALLINT * |
20 |
SQL_ATTR_PARAM_STATUS_PTR |
An array that stores status information for each row of parameter values after a call to SQLExecute, SQLExecDirect, or SQLExecDirectW. NULL SQLUSMALLINT pointer The driver does not return parameter status values. |
Supports the following value:
|
SQLUSMALLINT * |
21 |
SQL_ATTR_PARAMS_PROCESSED_PTR |
Address of the variable to which the driver returns the number of sets of parameters that have been processed (including error sets). NULL SQLULEN pointer The number of parameter sets is not returned. |
Supports the following value:
|
SQLULEN * |
22 |
SQL_ATTR_PARAMSET_SIZE |
Number of values for each parameter set. |
Supports the following value:
If a value other than 1 is set, the HADB ODBC driver rewrites the value to 1, and then returns SQL_SUCCESS_WITH_INFO. |
SQLULEN |
23 |
SQL_ATTR_QUERY_TIMEOUT |
The amount of time (in seconds) the application is to wait for an SQL statement to execute. |
This attribute is not supported. |
-- |
24 |
SQL_ATTR_RETRIEVE_DATA |
Whether SQLFetch is to acquire data after it has positioned the cursor to the specified location.
|
Supports the following value:
|
SQLULEN |
25 |
SQL_ATTR_ROW_ARRAY_SIZE |
Number of rows returned by SQLFetch or SQLFetchScroll |
Supports the following value:
|
SQLULEN |
26 |
SQL_ATTR_ROW_BIND_OFFSET_PTR |
A pointer to the offset that is added to the pointer used to change the binding of column data.
|
Supports the following value:
|
SQLULEN * |
27 |
SQL_ATTR_ROW_BIND_TYPE |
Binding orientation to be used when SQLFetch or SQLFetchScroll is called on the associated statement.
|
Supports the following value:
|
SQLULEN |
28 |
SQL_ATTR_ROW_NUMBER |
Current row number in the result set. |
This attribute is not supported. |
-- |
29 |
SQL_ATTR_ROW_OPERATION_PTR |
An array used to ignore rows during a batch operation using SQLSetPos.
|
Supports the following value:
|
SQLUSMALLINT * |
30 |
SQL_ATTR_ROW_STATUS_PTR |
A pointer to an array used to store row status values after a call to SQLFetch or SQLFetchScroll.
|
Supports the following value:
|
SQLUSMALLINT * |
31 |
SQL_ATTR_ROWS_FETCHED_PTR |
A pointer to the buffer that stores the number of fetched rows after a call to SQLFetch or SQLFetchScroll.
|
Supports the following value:
|
SQLULEN * |
32 |
SQL_ATTR_SIMULATE_CURSOR |
Whether a driver that simulates positioned update and delete statements guarantees that such statements change only a single row. |
This attribute is not supported. |
-- |
33 |
SQL_ATTR_USE_BOOKMARKS |
Whether an application uses bookmarks with a cursor. |
This attribute is not supported. |
-- |
Legend: --: Not applicable.