ODBC Driver for SQL Server

Supported ODBC API Functions - ODBC Driver for SQL Server



Supported ODBC Functions

The SQLGetInfo function returns information about the driver and data source. To find out whether a specific function is supported in the driver, call SQLGetFunctions.

For more information about the ODBC interface, see the ODBC Programmer's Reference.

ODBC Driver for SQL Server supports all deprecated functions for backward compatibility.

The following table lists the currently supported ODBC functions.

Function Name Support Standard Purpose

SQLAllocHandle

yes

ISO 92

Obtains an environment, connection, statement, or descriptor handle.

SQLConnect

yes

ISO 92

Connects to a specific driver by data source name, user ID, and password.

SQLDriverConnect

yes

ODBC

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

SQLAllocEnv

yes

Deprecated

Obtains an environment handle allocated from driver.

SQLAllocConnect

yes

Deprecated

Obtains a connection handle

ODBC API Calls for Obtaining Information about a Driver and Data Source

Function Name Support Standard Purpose

SQLDataSources

yes

ISO 92

Returns the list of available data sources, handled by the Driver Manager

SQLDrivers

yes

ODBC

Returns the list of installed drivers and their attributes, handles by Driver Manager

SQLGetInfo

yes

ISO 92

Returns information about a specific driver and data source.

SQLGetFunctions

yes

ISO 92

Returns the functions supported by the driver.

SQLGetTypeInfo

yes

ISO 92

Returns information about supported data types.

ODBC API Calls for Setting and Retrieving Driver Attributes

Function Name Support Standard Purpose

SQLSetConnectAttr

yes

ISO 92

Sets a connection attribute.

SQLGetConnectAttr

yes

ISO 92

Returns the value of a connection attribute.

SQLSetConnectOption

yes

Deprecated

Sets a connection option

SQLGetConnectOption

yes

Deprecated

Returns the value of a connection option

SQLSetEnvAttr

yes

ISO 92

Sets an environment attribute.

SQLGetEnvAttr

yes

ISO 92

Returns the value of an environment attribute.

SQLSetStmtAttr

yes

ISO 92

Sets a statement attribute.

SQLGetStmtAttr

yes

ISO 92

Returns the value of a statement attribute.

SQLSetStmtOption

yes

Deprecated

Sets a statement option

SQLGetStmtOption

yes

Deprecated

Returns the value of a statement option

ODBC API Calls for Preparing SQL Requests

Function Name Support Standard Purpose

SQLAllocStmt

yes

Deprecated

Allocates a statement handle

SQLPrepare

yes

ISO 92

Prepares an SQL statement for later execution.

SQLBindParameter

yes

ODBC

Assigns storage for a parameter in an SQL statement.

SQLGetCursorName

yes

ISO 92

Returns the cursor name associated with a statement handle.

SQLSetCursorName

yes

ISO 92

Specifies a cursor name.

SQLSetScrollOptions

yes

ODBC

Sets options that control cursor behavior.

ODBC API Calls for Submitting Requests

Function Name Support Standard Purpose

SQLExecute

yes

ISO 92

Executes a prepared statement.

SQLExecDirect

yes

ISO 92

Executes a statement

SQLNativeSql

yes

ODBC

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

SQLDescribeParam

yes

ODBC

Returns the description for a specific parameter in a statement.

SQLNumParams

yes

ISO 92

Returns the number of parameters in a statement.

SQLParamData

yes

ISO 92

Used in conjunction with SQLPutData to supply parameter data at execution time. (Useful for long data values.)

SQLPutData

yes

ISO 92

Sends part or all of a data value for a parameter. (Useful for long data values.)

ODBC API Calls for Retrieving Results and Information about Results

Function Name Support Standard Purpose

SQLRowCount

yes

ISO 92

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

SQLNumResultCols

yes

ISO 92

Returns the number of columns in the result set.

SQLDescribeCol

yes

ISO 92

Describes a column in the result set.

SQLColAttribute

yes

ISO 92

Describes attributes of a column in the result set.

SQLColAttributes

yes

Deprecated

Describes attributes of a column in the result set.

SQLFetch

yes

ISO 92

Returns multiple result rows.

SQLFetchScroll

yes

ISO 92

Returns scrollable result rows.

SQLExtendedFetch

yes

Deprecated

Returns scrollable result rows.

SQLSetPos

yes

ODBC

Positions a cursor within a fetched block of data and enables an application to refresh data in the rowset or to update or delete data in the result set.

SQLBulkOperations

yes

ODBC

Performs bulk insertions and bulk bookmark operations, including update, delete, and fetch by bookmark.

ODBC API Calls for Retrieving Error or Diagnostic Information

Function Name Support Standard Purpose

SQLError

yes

Deprecated

Returns additional error or status information

SQLGetDiagField

yes

ISO 92

Returns additional diagnostic information (a single field of the diagnostic data structure).

SQLGetDiagRec

yes

ISO 92

Returns additional diagnostic information (multiple fields of the diagnostic data structure).

ODBC API Calls for Obtaining Information About Database Objects (Catalog Functions)

Function Name Support Standard Purpose

SQLColumnPrivileges

yes

ODBC

Returns a list of columns and associated privileges for one or more tables.

SQLColumns

yes

X/Open

Returns the list of column names in specified tables.

SQLForeignKeys

yes

ODBC

Returns a list of column names that make up foreign keys, if they exist for a specified table.

SQLPrimaryKeys

yes

ODBC

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

SQLProcedureColumns

yes

ODBC

Returns the list of input and output parameters, as well as the columns that constitute the result set for the specified procedures.

SQLProcedures

yes

ODBC

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

SQLSpecialColumns

yes

X/Open

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

yes

ISO 92

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

SQLTablePrivileges

yes

ODBC

Returns a list of tables and the privileges associated with each table.

SQLTables

yes

X/Open

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

ODBC API Calls for Performing Transactions

Function Name Support Standard Purpose

SQLTransact

yes

Deprecated

Commits or rolls back a transaction

SQLEndTran

yes

ISO 92

Commits or rolls back a transaction.

ODBC API Calls for Terminating a Statement

Function Name Support Standard Purpose

SQLFreeStmt

yes

ISO 92

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

SQLCloseCursor

yes

ISO 92

Closes a cursor that has been opened on a statement handle.

SQLCancel

yes

ISO 92

Cancels an SQL statement.

ODBC API Calls for Terminating a Connection

Function Name Support Standard Purpose

SQLDisconnect

yes

ISO 92

Closes the connection.

SQLFreeHandle

yes

ISO 92

Releases an environment, connection, statement, or descriptor handle.

SQLFreeConnect

yes

Deprecated

Releases connection handle.

SQLFreeEnv

yes

Deprecated

Releases an environment handle.

© 2015-2024 Devart. All Rights Reserved. Request Support ODBC Forum Provide Feedback