Hitachi

Hitachi Advanced Database Application Development Guide


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.

Table 16‒21: 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:

  • Explicitly allocated APD

  • SQL_NULL_HDESC

    Forces automatic allocation of the APD.

  • Automatically allocated APD

Supports the following values:

  • Explicitly allocated APD.

  • SQL_NULL_HDESC

  • Automatically allocated APD

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:

  • Explicitly allocated ARD

  • SQL_NULL_HDESC

    Forces automatic allocation of the ARD.

  • Automatically allocated ARD

Supports the following values:

  • Explicitly allocated ARD.

  • SQL_NULL_HDESC

  • Automatically allocated ARD

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.

SQL_ASYNC_ENABLE_OFF

Does not execute the function asynchronously.

Supports the following value:

  • SQL_ASYNC_ENABLE_OFF

SQLULEN

4

SQL_ATTR_CONCURRENCY

Specification on cursor concurrency.

SQL_CONCUR_READ_ONLY

The cursor is read-only. No updates are allowed.

Supports the following value:

  • SQL_CONCUR_READ_ONLY

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.

SQL_NONSCROLLABLE

Scrollable cursors are not required on the statement handle.

Supports the following value:

  • SQL_NONSCROLLABLE

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.

SQL_UNSPECIFIED

It is not specified what the cursor type is and whether cursors on the statement handle detect changes made to a result set by another cursor.

Supports the following value:

  • SQL_UNSPECIFIED

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.

SQL_CURSOR_FORWARD_ONLY

The cursor scrolls only forward.

Supports the following value:

  • SQL_CURSOR_FORWARD_ONLY

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:

  • Automatically allocated IPD.

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:

  • Automatically allocated IRD.

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).

0

The data source returns all valid data.

Supports the following value:

  • 0

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).

0

The data source returns all rows.

Supports the following value:

  • 0

SQLULEN

15

SQL_ATTR_METADATA_ID

How to handle character string arguments of catalog functions.

SQL_FALSE

The case is significant and the character string arguments of catalog functions are not treated as identifiers.

Supports the following value:

  • SQL_FALSE

SQLULEN

16

SQL_ATTR_NOSCAN

Whether the driver performs syntax analysis on escape sequences and converts them to a DBMS-specific syntax.

SQL_NOSCAN_OFF

The driver converts escape sequences to a DBMS-specific syntax.

SQL_NOSCAN_ON

The driver does not convert escape sequences to a DBMS-specific syntax.

Supports the following value:

  • SQL_NOSCAN_OFF

  • SQL_NOSCAN_ON

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.

NULL

The driver does not add the value.

Supports the following value:

  • NULL

SQLULEN *

18

SQL_ATTR_PARAM_BIND_TYPE

Binding orientation to be used for dynamic parameters.

SQL_PARAM_BIND_BY_COLUMN

Specifies column-wise binding.

Supports the following value:

  • SQL_PARAM_BIND_BY_COLUMN

SQLULEN

19

SQL_ATTR_PARAM_OPERATION_PTR

An array used to ignore parameters during execution of an SQL statement.

NULL

The driver does not return parameter status values.

Supports the following value:

  • NULL

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:

  • NULL

  • SQLUSMALLINT pointer (other than NULL)

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:

  • NULL

  • SQLULEN pointer (other than NULL)

SQLULEN *

22

SQL_ATTR_PARAMSET_SIZE

Number of values for each parameter set.

Supports the following value:

  • 1

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.

SQL_RD_ON

SQLFetch acquires data after it has positioned the cursor to the specified location.

Supports the following value:

  • SQL_RD_ON

SQLULEN

25

SQL_ATTR_ROW_ARRAY_SIZE

Number of rows returned by SQLFetch or SQLFetchScroll

Supports the following value:

  • 1

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.

NULL

The driver does not add the value.

Supports the following value:

  • NULL

SQLULEN *

27

SQL_ATTR_ROW_BIND_TYPE

Binding orientation to be used when SQLFetch or SQLFetchScroll is called on the associated statement.

SQL_BIND_BY_COLUMN

Specifies column-wise binding.

Supports the following value:

  • SQL_BIND_BY_COLUMN

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.

NULL

The driver does not ignore rows.

Supports the following value:

  • NULL

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.

NULL

The driver does not return row status values.

Supports the following value:

  • NULL

  • SQLUSMALLINT pointer (other than NULL)

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.

NULL

The driver does not return the number of fetched rows.

Supports the following value:

  • NULL

  • SQLULEN pointer (other than NULL)

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.