M meiyuan Unregistered / Unconfirmed GUEST, unregistred user! 2002-12-17 #1 如何将: SQL.Add('SELECT * FROM sometable'); SQL.Add('WHERE some=:iSome') 改为模糊查询
Q qianwt Unregistered / Unconfirmed GUEST, unregistred user! 2002-12-17 #2 SQL.Add('SELECT * FROM sometable'); SQL.Add('WHERE some like ''%:iSome%''')
1 1疯狂delphi Unregistered / Unconfirmed GUEST, unregistred user! 2002-12-17 #4 SQL.Add('SELECT * FROM sometable'); SQL.Add('WHERE some like '+'%'+#39+:iSome+'%'+#39);
N naughtboy Unregistered / Unconfirmed GUEST, unregistred user! 2002-12-17 #5 或 SQL.Add('SELECT * FROM sometable'); SQL.Add('WHERE some like '+QuotedStr('%'+':iSome'+'%'))
L lucky9805 Unregistered / Unconfirmed GUEST, unregistred user! 2002-12-17 #6 TTable类提供了findnearest方法进行模糊查询的,试试看!
N nansha Unregistered / Unconfirmed GUEST, unregistred user! 2002-12-17 #7 Adoquery1.Close; ADOQuery1.SQL.Clear; ADOQuery1.SQL.Append('select * from sometable where some like aram ' ); ADOQuery1.Parameters.ParamByName('param').Value:='%'+Trim(Edit1.Text)+'%';
Adoquery1.Close; ADOQuery1.SQL.Clear; ADOQuery1.SQL.Append('select * from sometable where some like aram ' ); ADOQuery1.Parameters.ParamByName('param').Value:='%'+Trim(Edit1.Text)+'%';
S sunrainwang Unregistered / Unconfirmed GUEST, unregistred user! 2002-12-17 #8 定义Query1.sql: SQL.Add('SELECT * FROM sometable'); SQL.Add('WHERE some like :iSome'); 激活重新时: Query.active:=false; Query.Parames[0].asstring:='%'+Trim(Edit1.Text)+'%'; Query.active:=true;
定义Query1.sql: SQL.Add('SELECT * FROM sometable'); SQL.Add('WHERE some like :iSome'); 激活重新时: Query.active:=false; Query.Parames[0].asstring:='%'+Trim(Edit1.Text)+'%'; Query.active:=true;
J jiarui Unregistered / Unconfirmed GUEST, unregistred user! 2002-12-26 #10 select * from *.db where aaaa like 'bbbb'+'%'