ODBC Compliance

The ODBC API defines a set of core functions that correspond to the functions in the X/Open and SQL Access Group Call Level Interface specification. ODBC also defines two extended sets of functionality, Level 1 and Level 2.

For the specific ODBC API descriptions and implementation details, refer to the Microsoft Open Database Connectivity Software Development Kit.

The following lists summarize the functionality that is included in each conformance level.

Core API functions allow the following:

  • Allocation and releasing of environment, connection, and statement handles.

  • Conversion to data sources. Use of multiple statements on a connection.

  • Preparation and immediate execution of SQL statements.

  • Assignment of storage for parameters in a SQL statement and result columns.

  • Retrieval of data from a result set. Retrieval of information about a result set.

  • Commit or rollback transactions.

  • Retrieval of error information.

The Level 1 API allows all the core functions, plus the following:

  • Connection to data sources with driver-specific dialog boxes.

  • Set and inquire values of statement and connection options.

  • Transmission of part or all of a parameter value (useful for long data).

  • Retrieval of part or all of a result column value (useful for long data).

  • Retrieval of catalog information (columns, special columns, statistics, and tables).

  • Retrieval information about driver and data source capabilities, such as supported data types, scalar functions, and ODBC functions.

  • The Level 2 API allows all the core and Level 1 functions, plus the following:

  • Ability to browse connection information and list available data sources.

  • Transmission of arrays of parameter values. Retrieval of arrays of result columns values.

  • Retrieval of the number of parameters and description of individual parameters.

  • Scrollable cursor.

  • Retrieval of the native form of a SQL statement.

  • Retrieval of catalog information (privileges, keys, and procedures).

  • Translation DLL calls.

To claim that it conforms to a given API or SQL conformance level, a driver must support all the functionality in that conformance level, regardless of whether that functionality is supported by the DBMS that is associated with the driver. However, conformance levels do not restrict drivers to the functionality in the levels to which they conform. Drivers support as much functionality as they can; applications can determine the functionality that is supported by a driver by calling SQLGetInfo, SQLGetFunctions, and SQLGetTypeInfo.