MsiDatabaseCommit

[This is preliminary documentation and subject to change.]

The MsiDatabaseCommit function commits changes to a database.

UINT MsiDatabaseCommit(
  MSIHANDLE hDatabase    // database handle
);
 

Parameters

hDatabase
Handle to the database.

Return Values

ERROR_FUNCTION_FAILED
The function failed.
ERROR_INVALID_HANDLE
An invalid or inactive handle was supplied.
ERROR_INVALID_HANDLE_STATE
The handle is in an invalid state.
ERROR_SUCCESS
The function succeeded.

Remarks

The MsiDatabaseCommit function finalizes the persistent form of the database. All persistent data is then written to the writable database. No temporary columns or rows are written. The MsiDatabaseCommit function has no effect on a database that is opened as read-only. You can call this function multiple times to save the current state of tables loaded into memory. When the database is finally closed, any changes made after the database is committed are rolled back. This function is normally called prior to shutdown when all database changes have been finalized.

QuickInfo

  Windows NT: Requires version 4.0 or later. Available as a redistributable for Windows NT 4.0.
  Windows: Requires Windows 95 or later. Available as a redistributable for Windows 95.
  Windows CE: Unsupported.
  Header: Declared in msiquery.h.
  Import Library: Use msi.lib.

See Also

Database Access Reference, General Database Access Functions