Neoview ODBC Drivers Manual (R2.5)

rc = SQLSetConnectAttr(hdbc, SQL_ATTR_APPLNAME, value, strlen(value));
. . .
#include hpsqlext.h
SQLHENV henv;
SQLHDBC hdbc;
SQLHSTMT hstmt;
SQLRETURN retcode;
/*Allocate environment handle */
retcode = SQLAllocHandle(SQL_HANDLE_ENV, SQL_NULL_HANDLE, &henv);
if (retcode == SQL_SUCCESS || retcode == SQL_SUCCESS_WITH_INFO)
{
/* Set the ODBC version environment attribute */
retcode = SQLSetEnvAttr(henv, SQL_ATTR_ODBC_VERSION, (void*)SQL_OV_ODBC3, 0);
if (retcode == SQL_SUCCESS || retcode == SQL_SUCCESS_WITH_INFO)
{
/* Allocate connection handle */
retcode = SQLAllocHandle(SQL_HANDLE_DBC, henv, &hdbc);
if (retcode == SQL_SUCCESS || retcode == SQL_SUCCESS_WITH_INFO)
{
/* Set application name to "HPDM" */
SQLSetConnectAttr(hdbc, (void*)SQL_ATTR_APPLNAME, (SQLCHAR*) "HPDM", SQL_NTS);
/* Connect to data source */
retcode = SQLConnect(hdbc, (SQLCHAR*) "RUSH", SQL_NTS,
(SQLCHAR*) "Neo", SQL_NTS,
(SQLCHAR*) "Neo", SQL_NTS);
if (retcode == SQL_SUCCESS || retcode == SQL_SUCCESS_WITH_INFO)
{
/* Allocate statement handle */
retcode = SQLAllocHandle(SQL_HANDLE_STMT, hdbc, &hstmt);
if (retcode == SQL_SUCCESS || retcode == SQL_SUCCESS_WITH_INFO)
{
/* Process data */
...;
...;
...;
SQLFreeHandle(SQL_HANDLE_STMT, hstmt);
}
SQLDisconnect(hdbc);
}
SQLFreeHandle(SQL_HANDLE_DBC, hdbc);
}
}
SQLFreeHandle(SQL_HANDLE_ENV, henv);
Network I/O Compression
As of Release 2.5, you can configure the ODBC driver to perform network I/O compression.
Compression is off by default. To enable it:
Start the ODBC Client Administrator, and from the Configuration option:
1. Click the Network tab. The Network page appears.
2. For compression, select 1 from the drop-down list.
To turn compressionoff again, select 0(zero) or SYSTEM_DEFAULT from the drop-down
list.
Or, you can specify compression = 1 in the connection string.
IMPORTANT: Neoview systems before Release 2.5 do not support compression. Enabling
compression for an ODBC connection to a release of Neoview previous to Release 2.5 can cause
undefined behavior.
INFOSTATS Command
INFOSTATS is a pass-through command that collects statistics for a prepared statement. Statistics
are returned to the ODBC application as a result set as soon as the PREPARE is finished. The
result set has these columns:
INFOSTATS Command 27