Subject Re: [IBO] How do search at runtime?
Author Jason Wharton
You simply make use of the OnPrepareSQL event.
You may want to make use of the same routines that the controls use for
parsing and integrating the search criteria. I suggest you trace into the
handling of the SearchBuffer of the data links when IBO is going through the
OnPrepareSQL event processing. This will show you methods and routines you
can take advantage of if need be.

In most cases it is as simple as making controls 'search aware' as I show
the toggle button in the Contact sample application. There is a fair amount
written about making things 'search aware' in the archives too.

Jason Wharton
CPS - Mesa AZ

-- We may not have it all together --
-- But together we have it all --

----- Original Message -----
From: "Marco Menardi" <mmenaz@...>
To: <>
Sent: Sunday, March 16, 2003 3:36 PM
Subject: [IBO] How do search at runtime?

> Hi, with IB_Query in search state, I want to fill the fields with
> values and then perform the search programmatially (runtime).
> I've found that WriteSearch() and ReadSearch() are useless, since they
> refer to Controls (like CTL.frmContact.EditLASTNAME=Shmit), not
> FieldName=FieldValue (as should be CUSTOMER.LASTNAME='Shmit').
> Assigning with FieldByName('LASTNAME') does not work too, since when
> the IB_Query is in search state, the normal field buffer is not used.
> How can I do?
> I want something like
> With qryCustomer do
> Begin
> Search;
> FieldByName('NAME').AsString := 'Marco';
> First;
> End;
> Or something like with stringlist syntax...
> Regards
> Marco Menardi