Subject Re: [IBO] Problem of transactions
Author Helen Borrie
At 11:44 PM 07-11-02 -0400, you wrote:

>I do qry.edit

User A, transaction A


>As my load requires a new inserted client of course a client in another
>program using another transaction.

User B, transaction B.


>The lookcup comobo it shows the new client without problems

When you post the new client, Transaction B can see it. No other
transaction can see this change.
Next, you commit the change.
Now (because of Concurrency isolation) it will be seen by only a NEW
transaction.

>But at the
>time of insert Firebird (qry.applyupdates) it says to me that my new
>client does not exist. (I use for certain reason for this control a
>sentence in a trigger) If foreign key use does not give the error me.

Transaction A cannot see the new client that Transaction B added, because
Transaction A can see only the view it saw when it began.


>That it can be happening?
>
>It is because my transaction does not see the movement of the other
>single transaction but if use trigger.
>
>Isolation this in concurrency.

This is the correct behaviour for concurrency isolation. The purpose of
concurrency isolation is to provide a stable view - that is, the version of
data seen by the transaction is retained as a snapshot of its state at the
moment when the concurrency transaction began.


>With Isolation in Commited it does not generate the error but I have
>understood that he is better to use Isolation in Concurrency.

Someone gave you bad advice. Use Read Committed for multi-user interactive
work.

Concurrency isolation is useful for a transaction in which you are
preparing a report or a data export, where a "snapshot" of data is required.

Also, if you are not using CachedUpdates, do not use ApplyUpdates. Call
Post instead.

Helen