Supported ODBC Functions

Previous Next

The ODBC programming interface consists of functions that come in two categories:

Core functions

Extended functions (level 1, and level 2)

At the moment, the core functions and extended (level 1 and level 2) functions listed in the following table (grouped by task) are supported.

Supported ODBC Functions (Grouped by Task)

Task

Function

Level

Purpose

Connecting to a data source

SQLAllocEnv

Core

Obtains an environment handle. One handle is used for one or more connections

 

SQLAllocConnect

Core

Obtains a connection handle.

 

SQLBrowseConnect

2

Not supported.

 

SQLConnect

Core

Connects to a specific driver by data source name, user ID, and password. One connection is used for one or more statements.

 

SQLDriverConnect

1

Connects to a specific driver by connection string or requests that the Driver Manager and driver display connection dialogs for the user.

Obtaining Information about a driver & data source

SQLGetFunctions

1

Returns information about a specific driver and data source

 

SQLGetInfo

1

Returns supported driver functions.

This function also returns supported scalar functions for the infotypes: SQL_numeric_functions,

SQL_string_functions,

SQL_system_functions,

SQL_timedate_functions,

SQL_convert_functions.

 

SQLGetTypeInfo

1

Returns information about supported data types.

Setting & retrieving driver options

SQLGetConnectOption

1

Returns the value of a connection option.

 

SQLSetConnectOption

1

Sets a connect option.

 

SQLGetStmtOption

1

Returns the value of a statement option.

 

SQLSetStmtOption

1

Sets a statement option.

Preparing SQL requests

SQLAllocStmt

Core

Allocates a statement handle.

 

SQLPrepare

1

Prepares a SQL statement for later execution.

 

SQLBindParameter

1

Assigns storage for a parameter in a SQL statement.

 

SQLParamOptions

2

Specifies the use of multiple values for parameters.

 

SQLGetCursorName

Core

Returns the cursor name that is associated with a statement handle.

 

SQLSetCursorName

Core

Specifies a cursor name.

 

SQLSetScrollOptions

2

Not supported

Submitting requests

SQLExecute

Core

Executes a prepared statement.

 

SQLExecDirect

Core

Executes a statement.

 

SQLNativeSql

2

Returns the text of a SQL statement as translated by the driver.

 

SQLDescribeParam

2

Not supported.

 

SQLNumParams

2

Returns the number of parameters in a statement.

 

SQLParamData

1

Not supported yet.

 

SQLPutData

1

Not supported yet.

Retrieving results & information about results

SQLRowCount

Core

Returns the number of rows affected by an insert, update, or delete request.

 

SQLNumResultsCols

Core

Returns the number of columns in the result set.

 

SQLDescribeCol

Core

Describes a column in the result set.

 

SQLColAttributes

Core

Describes attributes of a column in the result set.

 

SQLBindCol

Core

Assigns storage for a result column and specifies the data type.

 

SQLFetch

Core

Returns a result row.

 

SQLExtendedFetch

2

Returns multiple result rows.

 

SQLGetData

1

Returns part or all of one column of one row of a result set. (Useful for long data values.)

 

SQLSetPos

2

Not supported.

 

SQLMoreResults

2

Determines whether there are more result sets available and, if so, initializes processing for the next result set.

 

SQLError

Core

Returns additional error or status information.

Obtaining information about the data source's system tables (catalog functions)

SQLColumns

1

Returns the list of column names in specified tables.

 

SQLColumnPrivileges

2

Not supported.

 

SQLForeignKeys

2

Not supported

 

SQLPrimaryKeys

2

Returns the list of column names that make up the primary key for the table.

 

SQLProcedureColumns

2

Not supported.

 

SQLProcedures

2

Not supported.

 

SQLSpecialColumns

1

Returns information about the optimal set of columns that uniquely identifies a row in a specified table, or the columns that are automatically updated when any value in the row is updated by a transaction.

 

SQLStatistics

1

Returns statistics about a single table and the list of indexes associated with the table.

 

SQLTablePrivileges

2

Not supported.

 

SQLTables

1

Returns the list of table names stored in a specific data source.

Terminating a statement

SQLFreeStmt

Core

Ends statement processing and closes the associated cursor, discards pending results, and, optionally, frees all resources associated with the statement handle.

 

SQLCancel

Core

Calls the SQLFreeStmt function.

 

SQLTransact

Core

Commits or rolls back a transaction

Terminating a connection

SQLDisconnect

Core

Closes the connection.

 

SQLFreeConnect

Core

Releases the connection handle.

 

SQLFreeEnv

Core

Releases the environment handle.