str:='delete from notebook where notetitle='+#39+'aaa'+#39;
AQ_File.Close;
AQ_File.SQL.Clear;
AQ_File.SQL.Add(str);
AQ_File.ExecSQL;

解决方案 »

  1.   

    str:='delete from notebook where notetitle=''aaa''';
    AQ_File.Close;
    AQ_File.SQL.Clear;
    AQ_File.SQL.Add(str);
    AQ_File.ExecSQL;
      

  2.   

    还是不行,还是提示:FROM了句语法错误。是不是ADOQUERY不支持
      

  3.   

    什么数据库,不同的数据库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;
      

  4.   

    str:='delete from notebook where notetitle=''aaa''';
      

  5.   

    Access 数据库
    谢谢以上几位,可是还是没有解决问题。
      

  6.   

    看不出有什么问题啊。
    楼上几位说的:>>str:='delete from notebook where notetitle=''aaa'';
           ->str:='delete from notebook where notetitle=''aaa''';
    改了没有?千万不要:notetitle不是字符型字段:(((
      

  7.   

    请用以下语句:
    close;
    sql.clear;
    sql.add('delete from notebook where notetitle=:notetitle');
    parambyname('notetile').asstring:='aaa';
    execsql;
    有问题告诉我!
      

  8.   

    str:='delete from notebook where notetitle='+''''+'aaa'+'''';
    保证没错!
      

  9.   

    str:='delete from notebook where notetitle="aaa"'';
      

  10.   

    str:='delete from notebook where notetitle="aaa"'
      

  11.   

    str:='delete notebook where notetitle=''aaa''';
    AQ_File.Close;
    AQ_File.SQL.Clear;
    AQ_File.SQL.Add(str);
    AQ_File.ExecSQL;
      

  12.   

    str:='delete notebook where notetitle=''aaa''';
    AQ_File.Close;
    AQ_File.SQL.Clear;
    AQ_File.SQL.Add(str);
    AQ_File.ExecSQL;
      

  13.   

    试试直接将sql语句放在access中执行,如果可以就是程序问题,如果不行就是sql语句的问题,看看是否使用了access的保留字
      

  14.   

    哈哈应该是:str:='delete notebook where notetitle=''aaa''';
      

  15.   

    应该是:
    delete tablename where fieldname= 'value'不能要from