Using isc commit transaction()
Use isc_commit_transaction() to write transaction changes permanently to a database. isc_commit_transaction() closes the record streams associated with the transaction, resets the transaction name to zero, and frees system resources assigned to the transaction for other uses. Before the commit completes, all changes are written to disk and all metadata updates are completed.
The complete syntax for isc_commit_transaction() is:
- ISC_STATUS isc_commit_transaction(ISC_STATUS *status_vector,
- isc_tr_handle *trans_handle);
For example, the following call commits a transaction:
- isc_commit_transaction(status_vector, &trans);
where status_vector is a pointer to a previously declared error status vector, and trans is a pointer to a previously declared and initialized transaction handle.
Tip: Even transactions started with an access mode of isc_tpb_read should be ended with a call to isc_commit_transaction() rather than isc_rollback_transaction(). The database is not changed, but the overhead required to start subsequent transactions is greatly reduced.