Creating a Data Source Name

ODBC API Conformance

ODBC drivers give an application access to diverse data sources. Each driver lets the application determine at run time what ODBC capabilities and what SQL grammar the driver and each data source supports.

All ODBC drivers must meet certain conformance standards. There are three levels of ODBC API Conformance.

click to view at full size.

Figure 6.14 Levels of ODBC API conformance

At a minimum, ODBC drivers must conform to the core-level interface. Core -level functionality represents what is required by most generic interoperable applications to enable the driver to work.

Many ODBC applications also require drivers that are compliant at Level 1; therefore, driver developers should implement all Level 1 functionality to ensure that their data sources are available to the widest possible audience. Level 2 drivers can also be used for extended sets of functionality.

The following lists summarize the functionality defined at each level of API conformance.

Core API

  • Allocate and free all types of handles.
  • Process interrupt statements.
  • Bind result set columns .
  • Handle dynamic parameters, including arrays of parameters, only in the input direction.
  • Specify a bind offset.
  • Manage cursors and cursor names .
  • Gain access to the description of result sets.
  • Retrieve catalog information.
  • Manage data sources and connections. Obtain driver information for any ODBC level supported.
  • Prepare and execute SQL statements.
  • Fetch from forward-only result sets.
  • Set and retrieve all or part of a parameter value.
  • Obtain diagnostic information.
  • Detect driver capabilities and get the native form of an SQL statement.
  • Commit and rollback transactions.

Level 1 API

  • Support all Core API functionality.
  • Specify the schema of database tables and views (using two-part naming).
  • Invoke true asynchronous execution of ODBC functions, where applicable .
  • Use scrollable cursors, thereby providing access to a result set in methods other than forward-only.
  • Obtain primary keys of tables.
  • Use stored procedures and query the data dictionary regarding stored procedures.
  • Connect to a data source by interactively browsing the available servers.
  • Use ODBC functions instead of SQL statements to perform certain database operations.
  • Gain access to the contents of multiple result sets generated by batches and stored procedures.

Note

Under ODBC 2.0, many Level 1 requirements have been moved to the Core API.


Level 2 API

  • Support all Level 1 API functionality.
  • Use three-part names for database tables and views.
  • Describe dynamic parameters.
  • Use input, output, and input/output (I/O) parameters, and result values of stored procedures.
  • Use bookmarks to update, delete, and fetch data.
  • Retrieve advanced information on the data dictionary.
  • Enable ODBC functions for individual statements to be executed asynchronously.
  • Provide time-out login requests and SQL queries.
  • Allow the default isolation level to be changed and "serializable" isolation transactions to be executed.


Microsoft Windows Architecture Training
Microsoft Windows Architecture for Developers Training Kit
ISBN: B00007FY9D
EAN: N/A
Year: 1998
Pages: 324

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net