Appearance
CommitTran
Declaration
Function CommitTran : boolean
Example
pascal
procedure OnMapEvent(var Value:Variant);
begin
if Not Source.CommitTran then //check that the transaction is started
begin
LogError('Unable to commit transaction');
Source.RollbackTran; //if it fails to commit then you need to rollback
end;
end;Description
This commits a new database transaction that you started with StartTransaction against the data definition. Database transactions are handled automatically so you do not normally need to use this function unless you want specific control over database transactions.
Any transactions you start with StartTransaction will need to be finalised by you with either CommitTran or RollbackTran