Neoview ODBC Drivers Manual (R2.2 SP1)
Table Of Contents
- HP Neoview ODBC Drivers Manual
- Table of Contents
- About This Document
- 1 HP Neoview ODBC Driver Overview for Windows
- 2 HP Neoview ODBC Drivers Overview for Linux, HP-UX, IBM AIX®, and Sun Solaris
- 3 Installing the HP Neoview ODBC Drivers
- Installing ODBC Client Software
- Avoiding Driver-Platform Version Incompatibility
- Installing the HP Neoview ODBC Driver for Windows
- Reinstalling the HP Neoview ODBC Driver for Windows
- Uninstalling the HP Neoview ODBC Driver for Windows
- Setting Up the Client Environment
- Troubleshooting
- Getting the Version of the Driver
- ODBC API Reference
- Installing or Reinstalling HP Neoview ODBC Drivers for Linux, HP-UX, IBM AIX®, and Sun Solaris
- Setting Up the Client Environment
- Running the Sample Program
- Troubleshooting
- Debugging
- Getting the Version of the Driver
- ODBC API Reference
- 4 Configuring Client Data Sources
- 5 HP Neoview ODBC Drivers Conformance
- 6 HP Neoview ODBC Drivers Messages
- Index

This is a read-only connection attribute that returns either SQL_CD_TRUE or SQL_CD_FALSE.
The value SQL_CD_TRUE means that the connection has been lost, while the value
SQL_CD_FALSE means that the connection is still alive.
A driver must implement this option efficiently, or it will impair the connection pooling
performance. Specifically, a call to get this connection attribute should not cause a round trip to
the server. Instead, a driver should just return the last known state of the connection. The
connection is dead if the last trip to the server failed, and not dead if the last trip succeeded.
To use a connection pool, an application performs the following steps:
1. Enables connection pooling by calling SQLSetEnvAttr to set the
SQL_ATTR_CONNECTION_POOLING environment attribute to
SQL_CP_ONE_PER_DRIVER or SQL_CP_ONE_PER_HENV. This call must be made before
the application allocates the shared environment for which connection pooling is to be
enabled. The environment handle in the call to SQLSetEnvAttr should be set to null, which
makes SQL_ATTR_CONNECTION_POOLING a process-level attribute. If the attribute is
set to SQL_CP_ONE_PER_DRIVER, a single connection pool is supported for each driver.
If an application works with many drivers and few environments, this may be more efficient
because fewer comparisons may be required. If set to SQL_CP_ONE_PER_HENV, a single
connection pool is supported for each environment. If an application works with many
environments and few drivers, this may be more efficient because fewer comparisons may
be required. Connection pooling is disabled by setting
SQL_ATTR_CONNECTION_POOLING to SQL_CP_OFF.
2. Allocates an environment by calling SQLAllocHandle with the HandleType argument set
to SQL_HANDLE_ENV. The environment allocated by this call will be an implicit shared
environment because connection pooling has been enabled. The environment to be used is
not determined, however, until SQLAllocHandle with a HandleType of SQL_HANDLE_DBC
is called on this environment.
3. Allocates a connection by calling SQLAllocHandle with InputHandle set to
SQL_HANDLE_DBC, and the InputHandle set to the environment handle allocated for
connection pooling. The Driver Manager attempts to find an existing environment that
matches the environment attributes set by the application. If no such environment exists,
one is created, with a reference count (maintained by the Driver Manager) of 1. If a matching
shared environment is found, the environment is returned to the application, and its reference
count is incremented.
The actual connection to be used is not determined by the Driver Manager until SQLConnect
or SQLDriverConnect is called.
4. Calls SQLConnect or SQLDriverConnect to make the connection. The Driver Manager uses
the connection options in the call to SQLConnect (or the connection keywords in the call to
SQLDriverConnect) and the connection attributes set after connection allocation to determine
which connection in the pool should be used.
NOTE: How a requested connection is matched to a pooled connection is determined by
the SQL_ATTR_CP_MATCH environment attribute.
5. Calls SQLDisconnect when done with the connection. The connection is returned to the
connection pool and becomes available for reuse.
For information on enabling connection pooling, see “Enabling Connection Pooling”.
Object Naming and Mapping
ANSI Name Type
The HP Neoview ODBC driver supports only ANSI name types for database objects.
Object Naming and Mapping 17