With ADOQuery1, SQL do
  begin
    Close;
    Clear;
    Add('INSERT INTO archivetitles ');
    Add('(title_id, title, type, pub_id)');
  
   Add('SELECT title_id, title, type, pub_id');
   Add('FROM titles');
   Add('WHERE (pub_id = '0766')');
    Open;
  end;提示错误
ADOQuery1 commandText does not return a redult set'.Process stopped.Use Step or Run to continue请问应该怎么写?

解决方案 »

  1.   

    open是返回数据集使用,要执行类似update,insert等不返回数据集的sql语句,要用ExecuteSQL
      

  2.   

    严重同意楼上大哥们的~~~!!^_^
    open  改为 execsql
      

  3.   

    open只能用于select 之类的查询
    删除,插入用execsql
      

  4.   

    查询用open 删除、插入,更改要execsql,不要以为是query就open哦!
      

  5.   

    查询用open 删除、插入,更改要execsql,不要以为是query就open哦!
    这个东西要调用两次的   一次是ExecSQL  令一次应该是 open