Subject Transaction open after a required field not populated , how to fix
Author wayne
I have a From wtih many datasets...
They are all in insert mode, all fields are populated with correct data,
except one REQUIRED field has no data.

My Code below is not perfect since a transaction will be Open/Started for
an undetermine period of time.

How can this be avoided. I have added timers that close the transaction, but
that is no solution as reasonable timers in human terms is 10-20 minutes.
or what ever time it requires for you to spend at the bathroom :) )

************OnClick Event Code Below ******************
try
tableAcc.Post;
tableEnq.Post;
rbUpdate1.FlushCache;
except on e: Exception do
begin
MessageDlg('Error ', mtWarning, [mbOK], 0);
exit; // Get out of here and dont Commit yet //
*****************we have a TRansaction Open *****************
*** Start a Timer ***
end;

try
trClient.Commit;
Close; // Close the Form
except on e: Exception do
begin
MessageDlg('Error Rolling back' , mtWarning, [mbOK], 0);
trClient.Rollback;
end;
end;