Here's a how an exception handler might look:

  except
  if tnxDataBase1.InTransaction then
  tnxDataBase1.Rollback;
  end;

Don't forget to call Cancel on any tables that are in Edit mode when rolling back!

Code actually should always look like this:

nxTable.Insert; //or .Edit;
try
  //....
  nxTable.Post;
except
  nxTable.Cancel;
  raise;
end;
Home | Site Contents | Documentation | FAQ, Tips & Tricks | NexusDB FAQ | Transactions, Locks, etc