Subject Re: [IBO] Problem with Stored Procedure - Server AutoCommit - Commit - CommitRetaign
Author Helen Borrie
At 04:07 PM 22/11/2004 +0100, you wrote:

>Now, it is clear.
>
>I have this setting:
>Isolation= tiConcurrency
>RecVersion=True; <-- In concurrency, RecVersion isn't relevant
>
>Following there is new code;
>
> if IB_Transaction2.TransactionIsActive then
> IB_Transaction2.Rollback
> else
> begin
> try
> IB_Transaction2.StartTransaction;
> try
> IB_StoredProcedureUpdateData.ExecProc;
> except
> IB_Transaction2.Rollback;
> end;

No. If you have to roll back, then you don't want the report to run!! You
must use an exception handler to trap the lock conflict and condition your
code accordingly.


> try
> IBOQueryReport.Prepare;
> IBOQueryReport.Open;
> except
> IB_Transaction2.Rollback;
> end;
>
> IB_Transaction2.Commit;
> except
> IB_Transaction2.Rollback;
> end;
> end;

Helen