Subject Re: [IBO] cached update for TIBOTable
Author Helen Borrie
At 12:06 AM 4/05/2005 +0000, you wrote:
>Hi there,
>I'm using Delphi 7 and IBObjects 4 with Firebird 1.0.
>I am having a problem with TIBOTable cached updates. I could not make
>it work as I expected.
>I have two applications.
>Start the first application, it opens a table, the salutation column
>has value "change11-1".
>Start the second application, it updates the same column value to
>"change12-1" and commits the change to the db. I can see the change in
>the table through IBConsole.
>Back to the first application, change the same column value from
>"change11-1" to "new value" and post and commit it. The OnUpdateError
>event is triggered. In the event handler, I set UpdateAction to
>uaApplied. I'm expecting "new value" be committed to the db. But it is
>I set TIBODatabase.isolation to tiConcurrency,

tiConcurrency isolates your transaction from work done by any other
transaction. Even if another user commits work on the same record, your
concurrency transaction will not see it. When your transaction tries to
post its change, it receives a locking conflict error because the committed
state of the database is now different to what it was when your concurrency
transaction began.

Note that your cached updates are not connected back to the database until
you call ApplyUpdates - that's the purpose of caching the set.