The Core interface conformance level provides all the basic
functionality an application needs in order to work with a data source. The standard
ODBC API subset defined for Core level conformance provides all of the functionality
defined in the ISO CLI specification and all of the non-optional functionality defined in
the 1992 X/Open CLI specification. A Core-level interface conformant ODBC
driver allows the application to do all of the following:
- Allocate and free all types of handles by calling SQLAllocHandle
and SQLFreeHandle.
- Bind result data set columns to application variables by calling SQLBindCol.
- Handle dynamic parameters, including arrays of parameters (but only in
the input direction), by calling SQLBindParameter and SQLNumParams.
- Specify a bind offset.
- Use the data-at-execution dialog, involving calls to SQLParamData
and SQLPutData.
- Manage cursors and cursor names, by calling SQLCloseCursor, SQLGetCursorName,
and SQLSetCursorName.
- Gain access to the description (metadata) of result data sets, by calling
SQLColAttribute, SQLDescribeCol, SQLNumResultCols, and SQLRowCount.
- Query the data dictionary by calling the catalog functions SQLColumns,
SQLGetTypeInfo, SQLStatistics, and SQLTables.
- Manage data sources and connections by calling SQLConnect, SQLDataSources,
SQLDisconnect, and SQLDriverConnect.
- Obtain information about drivers, no matter which ODBC level they
support, by calling SQLDrivers.
- Prepare and execute SQL statements using the dynamic SQL model of the
SQL-92 standard (i.e. prepare and execute a statement, optionally supplying parameter
values at runtime), by calling SQLExecDirect, SQLExecute, and SQLPrepare.
- Fetch a single row or multiple rows of data from a result data set (in
the forward direction only) by calling SQLFetch, or by calling SQLFetchScroll
with the FetchOrientation argument set to SQL_FETCH_NEXT.
- Retrieve data in parts from an unbound column of a result data set by
calling SQLGetData.
- Obtain the current values of all environment, connection, and SQL
statement attributes by calling SQLGetConnectAttr, SQLGetEnvAttr, and SQLGetStmtAttr,
set all attributes to their default values, and set certain attributes to non-default
values by calling SQLSetConnectAttr, SQLSetEnvAttr, and SQLSetStmtAttr.
- Manipulate certain fields of descriptors by calling SQLCopyDesc, SQLGetDescField,
SQLGetDescRec, SQLSetDescField, and SQLSetDescRec.
- Obtain diagnostic information about a field of a record by calling SQLGetDiagField
and SQLGetDiagRec.
- Detect driver capabilities by calling SQLGetFunctions and SQLGetInfo.
- Detect the result of any text substitutions made to an SQL statement
before it is sent to the data source by calling SQLNativeSql
- Commit a transaction using the syntax of SQLEndTran.
- Call SQLCancel to cancel the data-at-execution dialog and, in
multithread environments, cancel an ODBC function executing in another thread. Core level
interface conformance does not mandate support for asynchronous execution of functions,
nor for the ability to cancel an ODBC function that is executing asynchronously. Neither
the platform, nor the ODBC driver need be multithread for the driver to conduct
independent activities at the same time. However, in multithread environments, the ODBC
driver must be thread-safe. Serialization of requests from the application is a conformant
way to implement this specification, even though it may create serious performance
problems.
- Obtain row-identifying column information for any table in the data
source by calling SQLSpecialColumns