Commit Method

DTF API

Copy image CopyHover image
Deployment Tools Foundation Commit Method
Deployment Tools Foundation NamespacesMicrosoft.Deployment.WindowsInstallerDatabaseCommit()()()()
Finalizes the persistent form of the database. All persistent data is written to the writeable database, and no temporary columns or rows are written.
Declaration Syntax
C# Visual Basic Visual C++ F#
public void Commit()
Public Sub Commit
public:
void Commit()
member Commit : unit -> unit 
Remarks

For a database open in ReadOnly mode, this method has no effect.

For a database open in CreateDirect or Direct mode, it is not necessary to call this method because the database will be automatically committed when it is closed. However this method may be called at any time to persist the current state of tables loaded into memory.

For a database open in Create or Transact mode, no changes will be persisted until this method is called. If the database object is closed without calling this method, the database file remains unmodified.

Win32 MSI API: MsiDatabaseCommit

Exceptions
Exception Condition
InvalidHandleException the Database handle is invalid

Assembly: Microsoft.Deployment.WindowsInstaller (Module: Microsoft.Deployment.WindowsInstaller.dll) Version: 3.0.0.0 (3.11.1.2318)