Subject | Re: [IBO] Hooked in a cycle |
---|---|
Author | Svein Erling Tysvær |
Post date | 2001-01-09T08:09:51Z |
At 08:52 09.01.2001 +0200, Dorin wrote:
for InTransaction first)! IBO automatically starts a transaction when
necessary, so you don't have to worry about starting it. And I don't think
CommitRetaining or RollbackRetaining closes the transaction (whereas Commit
and Rollback does), so you're starting the transaction once for each
repetition without ever finishing it. I don't know whether this causes your
problems or not, but it doesn't sound like a wise thing to do.
Set
>I did it but the application still freezes.Yes, remove StartTransaction from your code (or if you really want it, test
>Any other suggestion, please ?
for InTransaction first)! IBO automatically starts a transaction when
necessary, so you don't have to worry about starting it. And I don't think
CommitRetaining or RollbackRetaining closes the transaction (whereas Commit
and Rollback does), so you're starting the transaction once for each
repetition without ever finishing it. I don't know whether this causes your
problems or not, but it doesn't sound like a wise thing to do.
Set
> FormCreate (open some queries used by TIB_LookupCombo)
> try
> EditControl:=GeneratorValue;
> repeat
> StartTransaction; //Get rid of this line!
> wOk = ShowModal;
> if wOk = mrOk then begin
> Execute SP
> try
> CommitRetaining
> except
> RollbackRetaining
> end
> end
> else RollbackRetaining
> until (wOk = mrCancel) or (transaction succeeds)
> finally
> FreeAndNil(Form);
> end
>
>Hope that I'm not too confusing, but can anyone help me ?
>
>Transaction settings are:
> AutoCommit : False
> Isolation : tiCommited
> ReadOnly : False
> RecVersion : True
> ServerAutoCommit : False