Subject Re: [IBO] Searching under program control
Author Lester Caine
> 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?

Try looking at -

ATable.Locate( 'AField', Edit1.Text, TIB_LocateOptions() );

--
Lester Caine
-----------------------------
L.S.Caine Electronic Services