Version: 7.0.0

Development Process ​

Figure 1 ODBC application development process
ODBC application development process

APIs Involved in the Development Process ​

Table 1 Related APIs

Function

API

Allocates handle resources

SQLAllocHandle: Allocates handle resources. It can replace the following functions:

Sets environment attributes

SQLSetEnvAttr

Sets connection attributes

SQLSetConnectAttr

Sets statement attributes

SQLSetStmtAttr

Connects to the data source

SQLConnect

Binds buffers to columns in the result set

SQLBindCol

Binds a parameter marker and buffer for an SQL statement

SQLBindParameter

Prepares for executing an SQL statement

SQLPrepare

Executes a prepared SQL statement

SQLExecute

Directly executes an SQL statement

SQLExecDirect

Fetches a rowset from the result set

SQLFetch

Returns data of a column in the result set

SQLGetData

Sends data to the server in batches

SQLPutData

Obtains the number of rows affected by the most recently executed SQL statement

SQLRowCount

Obtains error information

SQLError

Disconnects from the data source

SQLDisconnect

Frees handle resources

SQLFreeHandle: Frees handle resources. It can replace the following functions:

Warning:

ODBC serves as a middle layer between an application and the database, responsible for forwarding SQL commands issued by applications to the database. It does not parse SQL syntax itself. Therefore, when SQL statements containing confidential information (such as plaintext passwords) are written in applications, the confidential information will be exposed in driver logs.