Standards-Compliant Applications and Drivers
ODBC 3.0 guarantees that:
Standards-compliant applications and drivers are compiled with the ODBC_STD
compile flag.
Standards-compliant applications exhibit the following behavior:
An application written to the X/Open and ISO CLI specifications will work with
an ODBC 3.0 driver or a standards-compliant driver when it is compiled with
the ODBC 3.0 header files and linked with ODBC 3.0 libraries, and when it gains
access to the driver through the ODBC 3.0 Driver Manager.
A driver written to the X/Open and ISO CLI specifications will work with an
ODBC 3.0 application or a standards-compliant application when it is compiled
with the ODBC 3.0 header files and linked with ODBC 3.0 libraries, and when the
application gains access to the driver through the ODBC 3.0 Driver Manager.
If a standards-compliant application calls SQLAllocEnv (which may occur because SQLAllocEnv is a valid function in the X/Open and ISO CLI), the call is mapped to SQLAllocHandleStd at compile time. As a result, at run time, the application calls SQLAllocHandleStd. During the course of processing this call, the Driver Manager sets the
SQL_ATTR_ODBC_VERSION environment attribute to SQL_OV_ODBC3. A call to SQLAllocHandleStd is equivalent to a call to SQLAllocHandle with a HandleType of SQL_HANDLE_ENV and a call to SQLSetEnvAttr to set SQL_ATTR_ODBC_VERSION to SQL_OV_ODBC3.
If a standards-compliant application calls SQLBindParam (which may occur because SQLBindParam is a valid function in the X/Open and ISO CLI), the ODBC 3.0 Driver Manager
maps the call to the equivalent call in SQLBindParameter (see “SQLBindParam Mapping” in Appendix G, “Driver Guidelines for Backward Compatibility”).
To align with the ISO CLI, the ODBC 3.0 header files contain aliases for
information types used in calls to SQLGetInfo. A standards-compliant application can used these aliases instead of the ODBC
3.0 information types. For more information, see the next section, “Header Files.”
A standards-compliant application must verify that all features it supports
are supported in the driver it will work with. Setting the
SQL_ATTR_CURSOR_SCROLLABLE statement attribute to SQL_SCROLLABLE, and setting the
SQL_ATTR_CURSOR_SENSITIVITY statement attribute to SQL_INSENSITIVE or SQL_SENSITIVE are
capabilities that are available as optional features in the standards, but are not
included in the ODBC 3.0 Core level, so may not be supported by all ODBC 3.0 drivers.
If a standards-compliant application uses these capabilities, it should verify
that the driver that it will work with supports them.