Hitachi

Hitachi Advanced Database Application Development Guide


16.14 Attributes that can be specified in SQLSetConnectAttr, SQLSetConnectAttrW, SQLGetConnectAttr, and SQLGetConnectAttrW

The following table lists and describes the attributes that can be specified in SQLSetConnectAttr, SQLSetConnectAttrW, SQLGetConnectAttr, and SQLGetConnectAttrW.

Table 16‒19: Attributes that can be specified in SQLSetConnectAttr, SQLSetConnectAttrW, SQLGetConnectAttr, and SQLGetConnectAttrW

No.

Attribute

Description (convention)

Support status

Data type

1

SQL_ATTR_ACCESS_MODE

Whether the SQL statements that perform update operations are supported.

SQL_MODE_READ_ONLY

SQL statements that perform update operations are not supported.

SQL_MODE_READ_WRITE

SQL statements that perform update operations are supported.

Supports the following value:

  • SQL_MODE_READ_ONLY

  • SQL_MODE_READ_WRITE

SQLUINTEGER

2

SQL_ATTR_ANSI_APP

Switching between Unicode and ANSI functions.

SQL_AA_TRUE

Uses the ANSI function.

SQL_AA_FALSE

Uses the Unicode function.

Supports the following value:

  • SQL_AA_TRUE

  • SQL_AA_FALSE

This attribute is used for the driver manager. This attribute cannot be used for applications.

If this attribute is used in SQLGetConnectAttr or SQLGetConnectAttrW, an unsupported attribute error is returned.

SQLUINTEGER

3

SQL_ATTR_ASYNC_ENABLE

Whether a function called with a statement on the specified connection is executed asynchronously.

SQL_ASYNC_ENABLE_OFF

Disables asynchronous execution.

Supports the following value:

  • SQL_ASYNC_ENABLE_OFF

SQLUINTEGER

4

SQL_ATTR_AUTO_IPD

Whether automatic specification of the IPD after a call to SQLPrepare is supported.

This attribute is not supported.

--

5

SQL_ATTR_AUTOCOMMIT

Whether the automatic commit mode is to be used.

SQL_AUTOCOMMIT_OFF

The driver uses the manual commit mode. The application must explicitly commit or roll back transactions with SQLEndTran.

SQL_AUTOCOMMIT_ON

The driver uses the automatic commit mode. Each statement is committed immediately after it is executed.

Supports the following values:

  • SQL_AUTOCOMMIT_OFF

  • SQL_AUTOCOMMIT_ON

SQLUINTEGER

6

SQL_ATTR_CONNECTION_DEAD

Value indicating the connection status.

This attribute can be set in SQLGetConnectAttr or SQLGetConnectAttrW. This attribute cannot be set in SQLSetConnectAttr or SQLSetConnectAttrW.

This attribute is not supported.

This attribute is not supported in SQLSetConnectAttr or SQLSetConnectAttrW.

If this attribute is used in SQLGetConnectAttr or SQLGetConnectAttrW, an unsupported attribute error is returned.

SQLUINTEGER

7

SQL_ATTR_CONNECTION_TIMEOUT

The amount of time (in seconds) the application is to wait for a response to a connection request.

0

The ODBC driver does not detect a timeout. The value to be specified depends on the timeout control of the client library.

Supports the following values:

  • 0

SQLUINTEGER

8

SQL_ATTR_CURRENT_CATALOG

Catalog name used by the data source.

This attribute is not supported.

--

9

SQL_ATTR_ENLIST_IN_DTC

Whether Microsoft Component Services use the ODBC driver for distributed transactions.

This attribute is not supported.

--

10

SQL_ATTR_LOGIN_TIMEOUT

The amount of time (in seconds) the application is to wait for a response to a login request.

0

The ODBC driver does not detect a timeout. The value to be specified depends on the timeout control of the client library.

Supports the following values:

  • 0

If a value other than 0 is set, the HADB ODBC driver rewrites the value to 0, and then returns SQL_SUCCESS_WITH_INFO.

SQLUINTEGER

11

SQL_ATTR_METADATA_ID

How to handle character string arguments in catalog functions.

SQL_FALSE

The character string arguments in catalog functions are not assumed as identifiers. The character string arguments are case sensitive. Some arguments include a character string search pattern, and other arguments do not.

Supports the following value:

  • SQL_FALSE

If this attribute is used in SQLSetConnectAttr, an unsupported attribute error is returned.

--

12

SQL_ATTR_ODBC_CURSORS

How the driver manager uses the ODBC cursor library.

SQL_CUR_USE_IF_NEEDED

The driver manager uses the ODBC cursor library as needed.

SQL_CUR_USE_ODBC

The driver manager always uses the ODBC cursor library.

Supports the following values:

  • SQL_CUR_USE_IF_NEEDED

  • SQL_CUR_USE_ODBC

SQLINTEGER

13

SQL_ATTR_PACKET_SIZE

Network packet size (in bytes).

This attribute is not supported.

--

14

SQL_ATTR_QUIET_MODE

32-bit window handle.

This attribute is not supported.

--

15

SQL_ATTR_TRACE

Tracing notifications to the driver manager.

SQL_OPT_TRACE_OFF

Disables traces.

Supports the following values:

  • SQL_OPT_TRACE_OFF

SQLUINTEGER

16

SQL_ATTR_TRACEFILE

Trace file name.

This attribute is not supported.

--

17

SQL_ATTR_TRANSLATE_LIB

Library name.

This attribute is not supported.

--

18

SQL_ATTR_TRANSLATE_OPTION

A 32-bit flag value that is passed to the translator DLL.

This attribute is not supported.

--

19

SQL_ATTR_TXN_ISOLATION

The transaction isolation level for the current connection.

Before calling this function, the application must call SQLEndTran to commit or roll back all open transactions on a connection.

SQL_TXN_READ_COMMITTED

Sets the transaction isolation level in READ_COMMITTED.

SQL_TXN_REPEATABLE_READ

Sets the transaction isolation level in REPEATABLE_READ.

Supports the following values:

  • SQL_TXN_READ_COMMITTED

  • SQL_TXN_REPEATABLE_READ

SQLUINTEGER

20

SQL_ATTR_HADB_ORDER_MODE

HADB-specific attribute that is not in the ODBC conventions.

This attribute sets for the current connection the sort order for character string data in a SELECT statement in which the ORDER BY clause is specified.

SQL_HADB_ORDER_MODE_BYTE

Sort character string data by bytecode.

SQL_HADB_ORDER_MODE_ISO

Sort character string data by sort code (ISO/IEC 14651:2011 compliance).

Supports the following values:

  • SQL_HADB_ORDER_MODE_BYTE

  • SQL_HADB_ORDER_MODE_ISO

SQLUINTEGER

Legend: --: Not applicable.