数据模糊查询问题
with datacalldb.ADOsendlog do
begin
close;
sql.Clear;
sql.Add( 'select * from Tsend_log where context like ' '% '+quotedstr(memo1.Text )+ '% ');
open;
while not eof do
begin
..........
SQL语句有问题,一运行就提示在memo1.text输入的内容格式错误,同引号也试过这样也不行,但编译没有问题,可以通过。
sql.Add( 'select * from Tsend_log where context like ' '% '+quotedstr(memo1.Text )+ '% ' ' ');
[解决办法]
' '% '+quotedstr(memo1.Text )+ '% ');-> '+quotedstr( '% ' + memo1.Text + '% ');试一下