str:='delete from notebook where notetitle=''aaa'''; AQ_File.Close; AQ_File.SQL.Clear; AQ_File.SQL.Add(str); AQ_File.ExecSQL;
还是不行,还是提示:FROM了句语法错误。是不是ADOQUERY不支持
什么数据库,不同的数据库SQL语法是不同的 不过用参数就不会有问题,这样写 AQ_File.Close; AQ_File.SQL.Clear; AQ_File.SQL.Add('delete from notebook where notetitle=:aaa'); AQ_File.parameters.items[0].value:=aaa; AQ_File.ExecSQL;
str:='delete from notebook where notetitle=''aaa''';
Access 数据库 谢谢以上几位,可是还是没有解决问题。
看不出有什么问题啊。 楼上几位说的:>>str:='delete from notebook where notetitle=''aaa''; ->str:='delete from notebook where notetitle=''aaa'''; 改了没有?千万不要:notetitle不是字符型字段:(((
请用以下语句: close; sql.clear; sql.add('delete from notebook where notetitle=:notetitle'); parambyname('notetile').asstring:='aaa'; execsql; 有问题告诉我!
str:='delete from notebook where notetitle='+''''+'aaa'+''''; 保证没错!
str:='delete from notebook where notetitle="aaa"'';
str:='delete from notebook where notetitle="aaa"'
str:='delete notebook where notetitle=''aaa'''; AQ_File.Close; AQ_File.SQL.Clear; AQ_File.SQL.Add(str); AQ_File.ExecSQL;
str:='delete notebook where notetitle=''aaa'''; AQ_File.Close; AQ_File.SQL.Clear; AQ_File.SQL.Add(str); AQ_File.ExecSQL;
AQ_File.Close;
AQ_File.SQL.Clear;
AQ_File.SQL.Add(str);
AQ_File.ExecSQL;
不过用参数就不会有问题,这样写
AQ_File.Close;
AQ_File.SQL.Clear;
AQ_File.SQL.Add('delete from notebook where notetitle=:aaa');
AQ_File.parameters.items[0].value:=aaa;
AQ_File.ExecSQL;
谢谢以上几位,可是还是没有解决问题。
楼上几位说的:>>str:='delete from notebook where notetitle=''aaa'';
->str:='delete from notebook where notetitle=''aaa''';
改了没有?千万不要:notetitle不是字符型字段:(((
close;
sql.clear;
sql.add('delete from notebook where notetitle=:notetitle');
parambyname('notetile').asstring:='aaa';
execsql;
有问题告诉我!
保证没错!
AQ_File.Close;
AQ_File.SQL.Clear;
AQ_File.SQL.Add(str);
AQ_File.ExecSQL;
AQ_File.Close;
AQ_File.SQL.Clear;
AQ_File.SQL.Add(str);
AQ_File.ExecSQL;
delete tablename where fieldname= 'value'不能要from