Delphi SQL string problem

Posted by Harry711 on March 04, 2005

get input from editbox e // ex Tom
I want to put value in TQuery.Sql property to arrive at this statement:

Select name from customer where name like '%Tom%'

I have tried variations on this to no avail.

s := 'Select name from customer where name like ';
s:= s+"'%"+e.Text+"%'"
myQuery.SQL.Add(s);

Help.

Related Articles and Replies


[ Delphi Tutorials -- by DelphiLand ]