大概如下:ADODataSet1.close;
ADOCommand1.commandtext:='delete from table1 where name = 'yy'';
ADODataSet1.Recordset = ADOCommand.execute;
ADODataSet1.open;或者:
ADODataSet1.close;
ADODataSet1.CommandText:='delete from table1 where name = 'yy'';
ADODataSet1.open;
删除操作上成功了,可是弹出“recordset can not open!!”的对话框!!
如果取消该对话框

解决方案 »

  1.   

    ADOCommand.execute;
    不会返回数据集,因此上述程序不可用!
      

  2.   

    因为你的sql语句不返回值。。
    所以不能用open.
    而要用execute;
      

  3.   

    ADODataSet1.close;
    ADOCommand1.commandtext:='delete from table1 where name = 'yy'';
    ADODataSet1.Recordset = ADOCommand.execute;
    ADODataSet1.open;或者:
    ADODataSet1.close;
    ADODataSet1.CommandText:='delete from table1 where name = 'yy'';
    ADODataSet1.open;
    删除操作上成功了,可是弹出“recordset can not open!!”的对话框!!
    如果取消该对话框
    请注意:ADOCommandz执行的sql操作并没有发回数据集合!
    所以在操作上,所以,当你打开一个没有接受返回数据集的操作,当然会出错了!所以不用接受数据集
    还有用ADOcomnad执行delete语句,消费很大,用ADOQuery或者ADODataSet就可以了
      

  4.   

    返回非记录集用execute 拉~!
      

  5.   

    DELE是不会返回记录集的,
    OPEN是要返回记录集的
    当然不行了!
      

  6.   

    返回数据集的语句用Open否则一律用execute
      

  7.   

    把ADODataSet1.OPEN换成 ADODataSet1.EXECSQL