TransactionCommit (NoteDatabase - LotusScript)

Makes changes to a database in a batch after a TransactionBegin call.

Defined in

NotesDatabase

Syntax

Call notesDatabase.TransactionCommit()

Usage

TransactionCommit can be called only after TransactionBegin. If the database being changed is allowed to go out of scope before TransactionCommit is called, all recorded changes are discarded and do not take effect.

Note: For important information about using Transaction methods, see Effects of using transaction controls.

Example

Sub Initialize
  Dim s as new NotesSession
  Dim db as NotesDatabase
  Dim doc as NotesDocument
  Set db = s.GetDatabase("myserver", "mydb")
  Call db.TransactionBegin()
  Set doc = db.CreateDocument()
  Call doc.ReplaceItemValue("Form", "Memo")
  Call doc.ReplaceItemValue("Subject", "TestDoc")
  Call doc.Save(True,False)
  Call db.TransactionCommit()
End Sub