Subject Re: [IBO] How to cancel ib_query search
Author Daniel Rail
Hi,

At February 2, 2006, 4:58 AM, jeffplata wrote:

> I had this general series of ib_query command:

> ib_query.open //select *, shows all table contents on a grid
> ib_query.search //put the query in search mode
> ib_query.post //search executed properly
> -OR-
> ib_query.cancel //cancel the query search mode

> My problem is with ib_query.cancel. Instead of returning the
> previously opened set of records, the table (and effectively the
> grid) now returns no record at all. If I attach an ibo updatebar and
> click cancel button (the x), the searchmode is cancelled and the
> previous record set is returned.

> What is the proper way to cancel a search in code?

Here's the code behind the Cancel button of the TIB_UpdateBar(found in
IB_UpdateBar.pas, around line 695):

if State = dssSearch then
begin
ClearSearch;
Open;
end
else
begin
Cancel;
end;

That should work.

--
Best regards,
Daniel Rail
Senior System Engineer
ACCRA Group Inc. (www.accra.ca)
ACCRA Med Software Inc. (www.filopto.com)