select * from where aaa in (:eee)-变量这是在delphi的sql语句,
eee.astring:=edit.text问题是我在edit.text里输入一个条件查询正常如sss不用输入引号,怎样输入多个条件变量就查询错误,有更好的解决方法吗?谢谢大家了
如 select * from where aaa in('sss',fff')
eee.astring:=edit.text问题是我在edit.text里输入一个条件查询正常如sss不用输入引号,怎样输入多个条件变量就查询错误,有更好的解决方法吗?谢谢大家了
如 select * from where aaa in('sss',fff')
先把各个条件加到一个tstringlist中
然后在tstringlist 中加如''和,等
在拼成你要的条件
params.parambyname('eee').asstring:=Quotedstr(Edit1.text);
你可以试着不用变量嘛。
format('select * from where aaa in "%s"',[edit1.text]);