Re: Searching Data in Table


[ Related Articles and Replies ] [ DelphiLand Discussion Forum ]

Posted by WAllison on February 20, 2003 at 14:58:31:

In Reply to: Searching Data posted by Zaenal afif on February 20, 2003 at 14:35:45:

: Hi, I get difficulties in searching data from table, coz I wanna try to make "Dictionary programs".........
: Please I need It..................................

Use a TQuery component - using code something like this:

Query.Close;
Query.Sql.Clear;
Query.Sql.Add('SELECT * from tablename.db WHERE tablename.fieldname LIKE "'+searchtext+'%"');
Query.Open;

this will find all records where the field contains the search text(anywhere).

hope this helps a little.




Related Articles and Replies:


[ Related Articles and Replies ] [ DelphiLand Discussion Forum ]