Help DElphi 6 icremental search with ADOQuery

-- This search work --

1 ADOQuery1.Close;
2 ADOQuery1.SQL.Clear;
3 ADOQuery1.SQL.ADD('Select * from jy_contact');
4 ADOQuery1.SQL.ADD('Where fname like :fname');
5 ADOQuery1.SQL.Add(' or lname like :lname');
6 ADOQuery1.Parameters.ParamByName('fname').Value:=edit1.Text;
7 ADOQuery1.Parameters.ParamByName('lname').Value:=edit1.Text;
8 ADOQuery1.Open;
9 ADOQuery1.Active:=true;

__ I want to be able to do incremental search using '%'
for instance
how to write:
ADOQuery1.SQL.ADD(''Where fname like :fname' +'%'');
so than I can retrieve all the data starting by 'edit1.text'
thank you very

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!