Appearance
RollbackTran
Declaration
Function RollbackTran : boolean
Example
pascal
procedure OnMapEvent(var Value:Variant);procedure OnMapEvent(var Value:Variant);
begin
If Global1 = False then //check a flag you have set to determine whether you want the transaction
Dest.RollbackTran;
end;pascal
procedure OnMapEvent(var Value:Variant);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 rolls back 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 orRollbackTranRollBackTran