数据库高手大哥:ADODataSet数据集的DeleteRecords方法怎么用啊????特别是它的参数是什么意思?能不能利用其中的一个参数arFiltered来达到数据过滤后记录的删除呢?????????

解决方案 »

  1.   

    arCurrent Only the deletes the current record.
    arFiltered Only deletes records accessible through the current filter.
    arAll Deletes all records in the recordset.
    arAllChapters Deletes records in all chapters (ADO chapters)可以删除满足过滤条件的纪录arFiltered
      

  2.   

    直接使用sql语句('delete from db where nam='+#39+'小强'+#39)
      

  3.   

    有错误啊!!“缺少更新或刷新的键列信息”这是什么意思呢
    ADOTable.Filtered := False;
    ADOTable.Filter := '过滤条件';
    ADOTable.Filtered := True;


    ADOTable.DeleteRecords(arFiltered);//有错误啊当我检测ADOTable.Filtered := True;后ADOTable的State的状态是:dsBrowse 这是为什么呢??
      

  4.   

    Delphi 语法
    type TAffectRecords = (arCurrent, arFiltered, arAll, arAllChapters);//类型
    procedure DeleteRecords(AffectRecords: TAffectRecords = arAll);//定义
    参数 意思arCurrent 只删除当前记录
    arFiltered 只删除过滤后的记录
    arAll 删除所有记录
    arAllChapters     具体是什么我也不懂,试试看