ODBC Using CONNECT, DISCONNECT, COMMIT, and ROLLBACK

The following table lists each transaction management statement and describes how it works when you use the ODBC interface to connect to a database:

Statement

Description

CONNECT

Establishes the database connection. After you assign values to the required properties of the transaction object, you can execute a CONNECT. When you connect to the database, the DBMS name returned by the ODBC SQLGetInfo call is returned in the transaction object property SQLReturnData.

DISCONNECT

Terminates a successful connection. When a DISCONNECT is executed, PowerBuilder internally executes a COMMIT WORK statement to commit all changes and then issues a CLOSE DATABASE statement to terminate the logical unit of work.

COMMIT

Applies all changes made to the database since the beginning of the current unit of work.

ROLLBACK

Undoes all changes made to the database since the beginning of the current logical unit of work.


See also

ODBC Performance and locking