ADOQuery的Filter问题!!!
用ADOQuery的Filter过滤,有and 多条件
Filter内容如下:
if Edit.Text='所有' then
ADOQuery1.Filter:=' rq>='+''''+FormatDateTime('yyyy-mm-dd',DBDateTimeEditEh1.Value)+''''+' and rq<='+''''+FormatDateTime('yyyy-mm-dd',DBDateTimeEditEh2.Value)+''''+' and kfmc like '+''''+edit2.Text+'%'+''''
else
ADOQuery1.Filter:='lhid='+inttostr(lhid)+' and rq>='+''''+FormatDateTime('yyyy-mm-dd',DBDateTimeEditEh1.Value)+''''+' and rq<='+''''+FormatDateTime('yyyy-mm-dd',DBDateTimeEditEh2.Value)+''''+' and kfmc like '+''''+edit2.Text+'%'+'''';
程序在SQL MSSERVER 服务器端运行没有问题,可在客户端运行时,
就提示 "项目在所需的名称或序数中未被发现" 的错误。
为什么服务器端可以,客户端就有错,是我Filter写的有问题吗?