Transaction Handling Question

I want to confirm the correct transaction Handling.
my_key varchar(20)

which my_key is primary key not allow duplicate.

In server Side DataService I set RaiseExceptionAtError = True;

My Test case:

my_key = ‘1’
my_key = ‘2’
my_key = ‘1’ << this is raise duplicate key error.

I use daMemTable to insert above valee.

daMemTable.ApplyUPdate(); Then it raise primary key error which is correct. Then I quit the application.

I expect all changes is cancelled. However,
my_key = ‘1’
my_key = ‘2’

this two record is saved succefully.

How can I achieve, if applyupdate fail, all changes is cancelled. Mean all changes in one transaction else all rollback.

Please advise how to do that.


you need to change TDataAbstractService.ReturnUpdateFailureDelta to False.

if you are using personal Business Processor - change TDABusinessProcessor.RaiseExceptionAtError to True