Subject Re: [IBO] Hooked in a cycle
Author Helen Borrie
I think this was answered some days ago.

The problem you are encountering is a bug in InterBase. You will need to
set Prepared false and then call Prepare again, each time the loop executes.

H.


At 04:59 PM 08-01-01 +0200, you wrote:
>Hi all !
>I had some problems with my connections and I haven't receive anything for
>few days.
>I posted a message but no answer. So I try again.
>
>I have a form with many inputs (TEdit,TIB_Edit, TIB_RadioGroup,
>TIB_LookupCombo).
>The TEdit value is filled after the form is created, based on a generator
>value.
>When all the values are supplied I make an insert and some updates (in a
>Storedproc with params from the values in the form).
>All of this are in a repeat... until block. (The reason is that the user
>must fill all the controls only the first time).
>If the Storedproc succeed it's OK. But if not (rollbacked), either the user
>cancel the form or retries (after changing some values) the application
>freezes.
>
> FormCreate (open some queries used by TIB_LookupCombo)
> try
> EditControl:=GeneratorValue;
> repeat
> StartTransaction
> 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
>
>Thanks,
>Dorin
>
>
>

All for Open and Open for All
InterBase Developer Initiative ยท http://www.interbase2000.org
_______________________________________________________