db_commit()

Purpose

Commits updates to a database

Old name

#define commit() (db_commit()==0)

Syntax (CCOWN)

int db_commit(void)

Syntax (DP4DBAPI)

int dp4_db_commit(DCONN * dconn)

Description

The function db_commit() attempts to write the pending updates to the database, making any checks specified in previous calls to the functions rec_post_with_flags(), rec_verify() and rec_kill().

Return values

Returns 0 for success or an error code indicating the reason for the commit failure.

The OWN version of the funcions stores the return value in the global variable fail_code

See also

db_checkpoint(), db_decommit(), rec_post_with_flags()