next up previous contents index
Next: Handling NULL Values Up: Using the Interface Previous: Other Database Operations   Contents   Index


Transaction Management

Depending on how the transaction options are set in ODBC.INI for data sources, changes to the data source tables may not be committed (i.e., the changes become permanent) until the user expicitly issues a commit statement. Some ODBC drivers support autocommit, which, if on, means that every update operation is immediately committed upon execution. If autocommit is off, then an explicit commit (or rollback) must be done by the program to ensure the updates become permanent (or are ignored.).

The predicate odbc_transaction/1 supports these operations.

odbc_transaction(autocommit(on))
Turns on autocommit, so that all update operations will be immediately committed on completion.
odbc_transaction(autocommit(off))
Turns off autocommit, so that all update operations will not be committed until explicitly done so by the program (using one of the following operations.)
odbc_transaction(commit)
Commits all transactions up to this point. (Only has an effect if autocommit is off).
odbc_transaction(rollback)
Rolls back all update operations done since the last commit point. (Only has an effect if autocommit is off).


next up previous contents index
Next: Handling NULL Values Up: Using the Interface Previous: Other Database Operations   Contents   Index
Luis Fernando P. de Castro 2003-06-27