ODBC/MX Driver for Windows Manual (SQL/MX 2.x)

ODBC/MX Client Overview
HP NonStop ODBC/MX Driver for Windows527888-004
1-6
Object Naming and Mapping
For detailed information about connection pooling and the ODBC API functions, refer
to the Microsoft ODBC Programmer’s Reference on the Microsoft Web site
(www.microsoft.com).
Object Naming and Mapping
ODBC/MX can access SQL database objects as follows:
with an alias, for SQL/MP objects that have an alias name (See ANSI Names for
SQL/MP Objects).
with a Guardian name in the query, for SQL/MP objects without an alias name.
Guardian Names in SQL commands
ODBC/MX also supports Guardian names in SQL statements (these names are called
NSK names in the SQL/MX documentation); SQL reserved words that are part of
Guardian names must be in upper case and enclosed in double quotes. (For more
information, see the SQL/MX Reference Manual.) However, Guardian names are not
supported in catalog APIs; the APIs only allow ANSI name types.
ANSI Name Type
ODBC/MX supports only ANSI name types for NonStop SQL objects.
Using the client interface at a client workstation, you can configure the default catalog
and schema names used to qualify the table names in queries.
The name format is as follows:
8. Retrieve and process
data from the database
When using connection pooling, an application must preserve
the database context within the session and should not
execute SQL/MX statements that change the name of the
database or its context.
9. Disconnect and return
the connection to the
connection pool
Call SQLDisconnect.
Note: If a transaction is pending when an application calls
SQLDisconnect and SQL_ATTR_AUTOCOMMIT is set to
SQL_AUTOCOMMIT_OFF, ODBC/MX returns SQLSTATE
25000 (Invalid transaction state). The application must then
explicitly commit or roll back the transaction, and then
disconnect.
10. Free the environment
and connection
handles
Call SQLFreeHandle for each handle.
Step Client Action