Subject Re: [IBO] PessemisticLocking performs commit retaining
Author xpl_nico
--- In, "Jason Wharton" <jwharton@i...>
> I need to look into this more. Will you please send me a sample of
> privately?

Hi Jason,
Thanks for your reply.
I found when IBO peforms the commitretaining.
Using the TIBOQuery, when i set the dataset in editmode the LockSQL
Until now no commit is peformed and the record is locked.

If i cancel the edit (Dataset.cancel) a commitretaining is performed.
The modified record get's canceled but the modification of
the "Locked" field is commited.This behaviour is the same for a
modified and unmodified dataset.

I imlemented a RollBack in the AfterCancel event of the dataset, but
this event is triggerd after the CommitRetaining took place.

When i perform a RollBack instead of canceling the dataset the
modification of the "locked" field is rollbacked and no
commitretaining takes place afterwards.IMHO this is a kind
of "brutal" workaround.

So bottemline, my findings are that a cancel on the dataset does a
commitretaining when using pessemistic locking.

In my current situation i dont allow the user to edit more than 1
record at the time in a seperate transaction.
I'm worried what would happen if i have multiple updated(posted)
record's in one transaction and i cancel the current record ?
IMHO these posted records will be commited due the commitretaining
behaviour after a cancel.

I hope this provide's you with enough information, if you still need
a sample app. then please let me know.

Best regards,
Nico Schoemaker.