Subject Re: [IBO] Error on IB_Query
Author George Hugo
> Probably you have committed the transaction and closed your dataset. When
> the call to Open comes, there is nothing to open. What are you doing,
that
> you are opening your query a second time? We would have to see some code,
> to try to work out what's causing it.
>
>
> regards,
> Helen Borrie (TeamIBO Support)

Part of the Code on Open

procedure TfrmCad_Browse.Exec(Tabela: PTIB_Query; Chamar: TChama;
Fecha: TFecha; Titulo: String; Items: Array of String; Icone: TIcon);
var


...
tbBrowse:=Tabela^;
tbBrowse.IB_Transaction:=trBrowse;

tbBrowse.ConfirmDeletePrompt.Clear;
tbBrowse.ConfirmDeletePrompt.Add(Format(SConfirmaDelecao,[Titulo]));

trBrowse.StartTransaction;
tbBrowse.Prepare;
...
tbBrowse.Open; // At second time the code is executed, the error reported
is generated.
...
Showmodal;

tbBrowse receives a IB_Query pointer that is passed as paremeter;
The IB_Query pointed is on a DataModule.
tbBrowse receives the IB_transaction of the form.

I realize all the procedures like inserts, edits, deletes an queries with
another form that is called for each procedure.

Code when I close the form

procedure TfrmCad_Browse.FormClose(Sender: TObject; var Action:
TCloseAction);
begin
tbBrowse.Unprepare;
trBrowse.Commit;
frmPrincipal.trMain.Commit;
end;

OnClose Event I do

IB_Dataset.Unprepare;

With other table it work fine.

I hope you can help me with this;

George