Development Process

Figure 1 ODBC-based application development process

APIs Involved in the Development Process

Table 1 API description

Function

API

Allocate a handle

SQLAllocHandle is a generic function for allocating a handle. It can replace the following functions:

Set environment attributes

SQLSetEnvAttr

Set connection attributes

SQLSetConnectAttr

Set statement attributes

SQLSetStmtAttr

Connect to a data source

SQLConnect

Bind a buffer to a column in the result set

SQLBindCol

Bind the parameter marker of an SQL statement to a buffer

SQLBindParameter

Return the error message of the last operation

SQLGetDiagRec

Prepare an SQL statement for execution

SQLPrepare

Run a prepared SQL statement

SQLExecute

Run an SQL statement directly

SQLExecDirect

Fetch the next row (or rows) from the result set

SQLFetch

Return data in a column of the result set

SQLGetData

Get the column information from a result set

SQLColAttribute

Disconnect from a data source

SQLDisconnect

Release a handle

SQLFreeHandle is a generic function for releasing a handle. It can replace the following functions:

NOTE:
If an execution request (not in a transaction block) received in the database contains multiple statements, the request is packed into a transaction. If one of the statements fails, the entire request will be rolled back.

Feedback
编组 3备份
    openGauss 2024-05-05 00:44:49
    cancel