Subject RE: [IBO] Problem with FindFirst - endless loop
Author Kevin Stanton
I have found the problem - I had some code in the OnActivate event to do
some refreshing and the "Fetching Query Results" was kicking off the
OnActivate when closing.
I remember seeing something about getting rid of this status window - time
to search the archives.
Kevin

-----Original Message-----
From: Jason Wharton [mailto:jwharton@...]
Sent: Wednesday, May 08, 2002 3:16 PM
To: IBObjects@yahoogroups.com
Subject: Re: [IBO] Problem with FindFirst - endless loop


I'll probably need a demo app to work with something like this.

Jason Wharton
CPS - Mesa AZ
http://www.ibobjects.com


----- Original Message -----
From: "Kevin Stanton" <Kevin.Stanton@...>
To: "IBO List" <IBObjects@yahoogroups.com>
Sent: Wednesday, May 08, 2002 2:33 PM
Subject: [IBO] Problem with FindFirst - endless loop


> The following code puts IBO into a loop, refetching data (the "Fetching
> Query Results" window keeps restarting).
>
> Any ideas will are greatly appreciated.
>
> Win 2K
> IBO V4.2.Gb
> Borland IB 6.01
>
>
>
> procedure TfrmOEList.btnFindClick(Sender: TObject);
> var
> UserResp : TModalResult;
> Fld : String;
> begin
> frmOrderSearchOE := TfrmOrderSearchOE.Create(Application);
> UserResp := frmOrderSearchOE.ShowModal;
> SFld1 := frmOrderSearchOE.SearchFld1;
> SFld2 := frmOrderSearchOE.SearchFld2;
> SVal1 := frmOrderSearchOE.edtSearch1.Text;
> SVal2 := frmOrderSearchOE.edtSearch2.Text;
> frmOrderSearchOE.Release;
>
> If UserResp <> mrOK then Exit;
>
> with dmOEExp.qryOrderList do
> begin
> dmOEExp.qryOrderList.InvalidateSQL;
> dmOEExp.qryOrderList.Refresh;
>
> Filter := SFld1 + '=''' + SVal1 + '''';
>
> If SVal2 <> '' then
> Filter := Filter + ' and ' + SFld2 + '=''' + SVal2 + '''';
>
> If NOT FindFirst then
> begin
> If SFld1 = 'CarPre' then
> Fld := SFld2;
> MessageDlg(Fld + ' is not found', mtInformation, [mbOK], 0);
> end;
> end;
> end;



Yahoo! Groups Sponsor
ADVERTISEMENT





___________________________________________________________________________
IB Objects - direct, complete, custom connectivity to Firebird or
InterBase
without the need for BDE, ODBC or any other layer.

___________________________________________________________________________
http://www.ibobjects.com - your IBO community resource for Tech Info
papers,
keyword-searchable FAQ, community code contributions and more !

Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



[Non-text portions of this message have been removed]