Subject Re: [IBO] Searching under program control
Author Jason Wharton
Search Criteria isn't in the fields data.
What works best is you write your own OnPrepareSQL event handler and
maintain your own customized SQL modifications. There are numerous examples
of using this event. Search archives and have a look at the Contact sample
application.

There are also ways to store and read criteria information which is stored
in the datalink layer, not in the data itself. I believe, of all places, the
LookupCombo sample app has a demonstration of reading and writing search
criteria.

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

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


----- Original Message -----
From: "Chris Wallis" <cwallis@...>
To: <IBObjects@yahoogroups.com>
Sent: Wednesday, February 12, 2003 9:37 AM
Subject: [IBO] Searching under program control


> I need to perform a search under program control using a TIB_Query object.
> The SQL in the query is just:
>
> SELECT * FROM ATABLE
>
> This is the genaral approach I tried that is not working:
>
> ATable.ClearSearch;
> ATable.Search;
> Atable.FieldByName('AField').AsString := Edit1.Text; {* Search Value *}
> Atable.Post;
>
> Can I use a general purpose query as described above to search a table
> programmatically? If yes, where can I find an example?