ODBC/MX Driver for Windows Manual for SQL/MX Release 3.2.1 (H06.26+, J06.15+)
Table Of Contents
- HP NonStop ODBC/MX Driver for Windows
- Legal Notices
- Contents
- What’s New in This Manual
- About This Manual
- 1 ODBC/MX Client Overview
- 2 Installation of the ODBC/MX Client
- 3 Configuring Client Data Sources on Windows
- Accessing the Microsoft ODBC Data Source Administrator from a Client Workstation
- Adding New Client Data Sources
- Reconfiguring Client Data Sources
- Configuring Client Data Sources using Connection String
- Configuring Client Data Sources for Update Operations
- Configuring Driver for IPV6
- Removing Client Data Sources
- Tracing Client Data Sources
- 4 Module File Caching (MFC)
- 5 ODBC/MX Conformance
- ODBC API Functions
- SQL Conformance Level
- SQL Scalar Functions
- ODBC Data Types
- Unsigned Data Types
- Partial Date/Time Values
- SQL/MP Data Types and ODBC/MX Equivalents
- Microsoft Escape Clauses
- Stored Procedures
- Transactions and Cursor Behavior with Multiple Statements
- Timestamp Values with Fraction
- SQL Interval Insertion Property
- SQL Datetime Retrieval Property
- 6 ODBC/MX Messages
- Glossary
- Index
ODBC/MX Client Overview
HP NonStop ODBC/MX Driver for Windows—691126-002
1-5
Enabling Connection Pooling
To use connection pooling, an ODBC client application must perform the following
sequence:
Step Client Action
1. Enable connection
pooling
Call SQLSetEnvAttr with the environment handle set to NULL
and the SQL_ATTR_CONNECTION_POOLING attribute set
to SQL_CP_ONE_PER_DRIVER or
SQL_CP_ONE_PER_HENV.
SQL_CP_OFF (the default) turns connection pooling off.
2. Allocate an environment
handle
Call SQLAllocHandle with the HandleType argument set to
SQL_HANDLE_ENV.
3. Specify how the ODBC
driver manager should
match an incoming
connection with the
connections in the pool
Call SQLSetEnvAttr and set the SQL_ATTR_CP_MATCH
attribute to SQL_CP_STRICT_MATCH (the default) or
SQL_CP_RELAXED_MATCH.
4. Specify the ODBC
version
Call SQLSetEnvAttr and set the
SQL_ATTR_ODBC_VERSION attribute to the application
version (for example, SQL_OV_ODBC3).
5. Allocate a connection
handle
Call SQLAllocHandle with the HandleType argument set to
SQL_HANDLE_DBC, and the InputHandle argument set to
the environment handle allocated for connection pooling.
6. Make the connection Call SQLConnect or SQLDriverConnect. The driver manager
uses the connection options and the
SQL_ATTR_CP_MATCH attribute to determine which
connection in the pool to assign to the application.
7. Set connection attributes Call SQLSetConnectAttr to set these attributes if necessary:
SQL_ATTR_TXN_ISOLATION
(default: SQL_TXN_READ_COMMITTED)
SQL_ATTR_ACCESS_MODE
(default: SQL_MODE_READ_WRITE)
SQL_ATTR_AUTOCOMMIT
(default: SQL_AUTOCOMMIT_ON)
SQL_ATTR_CURRENT_CATALOG
(default: NONSTOP_SYSTEM_NSK)
An application, however, cannot change the schema using an
ODBC API function. If more than one user wants to create
objects in the same schema, set the schema to
PUBLIC_ACCESS_SCHEMA (the default) using the
Microsoft ODBC Data Source Administrator.
Note: The catalog must exist on the NonStop Kernel.










