Subject Problem with Stored Procedure - Server AutoCommit - Commit - CommitRetaign
Author vincescarp
FB 1.5, IBOQuery

I use a SP to get data for report (Report Builder). It does updates
too before it select data.
Generally I use Autocommit and pessimisticlocking in my application
for user interface and explicit transactions when write record(s) in
background or in special reports that do updates.
If I use Commit after run my query it always locks record(s) until I
close report, instead with CommitRetaign or ServerAutocommit it
releases ones record(s).

try
IBTransaction2.StartTransaction;

IBOQuery1.Open;

IBTransaction2.Commit;
except
IBTransaction2.Rollback;
raise;
end;

When I use commit or autocommit and an other client run the same
report it get a deadlock error and if it try again it is as suspend
to waiting and I am contrained to stop Firebird Service because I
can't connect or run every query also in other program as IBExpert.

Thank You