OASQLIP_get_connect_info
- Last Updated: May 12, 2026
- 2 minute read
- OpenAccess SDK
- Version 8.1
- Documentation
This function is called to obtain information related to a connection, such as the current qualifier, transaction isolation, and auto-commit mode:
int OASQLIP_get_connect_info(
SQLIP_HDBC sqlip_hdbc,
OADS_INTEGER iInfoType,
OADS_POINTER CharValuePtr,
OADS_UINTEGER iBufferLen,
OADS_INTEGER * pInfoValueLen,
OADS_LEN * NumericValuePtr)
Parameters for OASQLIP_get_connect_info
| Parameter | Type | Description |
| INPUT | ||
| sqlip_hdbc | SQLIP_HDBC | Connection handle. |
| iInfoType | OADS_INTEGER | Requested information type. See Table Connection Options for OASQLIP_get_connection_info Options . |
| iBufferLen | OADS_UINTEGER | Size of the buffer pointed to by CharValuePtr (bytes). |
| OUTPUT | ||
| CharValuePtr | OADS_POINTER | Buffer for returning the requested information in. Character data is returned as OAWCHAR string. |
| piInfoValueLen | OADS_INTEGER * | The number of bytes written to CharValuePtr. |
| NumericValuePtr | OADS_LEN * | Integer buffer to use for returning numeric attribute values. |
| RETURN | ||
| int | OADS_SUCCESS OADS_ERROR – error allocating a connection handle |
Connection Options for OASQLIP_get_connection_info Options
| Information Type | Description |
| OADS_CONN_INFO_AUTOCOMMIT | An integer value indicating whether auto commit is on or off. SQL_AUTOCOMMIT_OFF (0) – Auto-commit is off. Transactions must be explicitly committed. SQL_AUTOCOMMIT_ON (1) – Auto-commit is on. The data source will implicitly commit transactions after a statement is executed. |
| OADS_CONN_INFO_CLIENT_ADDRESS | Connection level information. Returns the local IP address of the client as a string of the form "ddd.ddd.ddd.ddd" (for example, "100.23.24.25"). The value is a string of maximum 128 characters. This option can be used while running in client-server mode to implement a client IP-based authentication scheme. |
| OADS_CONN_INFO_CLIENT_APPLICATION | Connection level information indicating the name of the client application on this connection. The value is an ASCII string of maximum length 128. |
| OADS_CONN_INFO_CURRENT_QUALIFIER | The current qualifier/database. If not applicable, then return an empty string. |
| OADS_CONN_INFO_CLIENT_PUBLIC_ADDRESS | Connection level information. Returns the public IP address of the client as a string of the form "ddd.ddd.ddd.ddd" (for example, "100.23.24.25"). The value is a string of maximum 128 characters. This option can be used while running in client-server mode to implement a client IP-based authentication scheme. |
| OADS_CONN_INFO_CLIENT_TYPE | Connection level information indicating the OpenAccess SDK client type for this connection. The value is a short integer. The possible values are: |
| OADS_CONN_INFO_TXN_ISOLATION | An integer value indicating the transaction isolation level. SQL_TXN_READ_UNCOMMITTED (1) – Dirty reads, non-repeatable reads, and phantom reads are possible. SQL_TXN_READ_COMMITTED (2) –Dirty reads are not possible. Non-repeatable reads and phantom reads are possible. This is the default. SQL_TXN_REPEATABLE_READ (4) – Dirty reads and reads that cannot be repeated are not possible. Phantoms are possible. SQL_TXN_SERIALIZABLE (8) – Transactions can be serialized. Dirty reads, non-repeatable reads, and phantoms are not possible. |