table1.EmptyTable;
相应的
adotable的
adotable1.EmptyTable没有?
??
------------------------------------
支持CSDN's forum Explorer
   《CSDN论坛新助手 CSDN's forum Explorer》
  1、更快速的浏览
  2、更方便地保存
  3、更快捷的收/发短信
  下载地址:http://www.seeyou.com.cn/CoolSlob/CSDNExplorer.exe
  
------------------------------------   《CSDN论坛新助手 CSDN's forum Explorer》
  1、更快速的浏览
  2、更方便地保存
  3、更快捷的收/发短信
  下载地址:http://www.seeyou.com.cn/CoolSlob/CSDNExplorer.exe

解决方案 »

  1.   

    好像没有吧?!
    楼主可以用SQL语句自己清空表,很简单的一条语句就可以了。如
    ADOQuery.SQL.add('Delete from Table');
      

  2.   

    ADOQuery.SQL是可以
    那adotable ???我想用它
    谢谢
      

  3.   

    用ADOTABLE?
    不如用ADOQUERY好用
    ADOQuery.SQL.add('Delete from Table');
    不过用ADOTABLE 也可以实现
    ADOTABLE.FIRST;
    while not adoquery.eof do begin
    adotable.delete;
    adotable.next;
    end;
      

  4.   

    这么麻烦 吗?
    用bde
    table1.emptytable 就可以了阿 !
    再次求助!
    谢谢各位!
      

  5.   

    ADOtable没有这个函数
    只有Table有
      

  6.   

    ADOTable比BDE少了好多方法比如还有Table.Exists,ADO也没有
    换条路走吧。
      

  7.   

    ADOTABLE.FIRST;
    if not adoquery.eof then 
    begin
    adotable.delete;
    else
    adotable.next;
    end;
      

  8.   


    function TForm1.emptytable(name:string): boolean;//实现table1.emptytable的函数
    var
     adotable:tadotable;
    begin
     adotable:=tadotable.Create(nil);
      adotable.Name:=name;
      adotable.TableName:='archive';
      adotable.ConnectionString:='Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\文件勿删\delphi文件\archive.mdb;Persist Security Info=False';
     if not adotable.active then
       adotable.Open;
      adotable.First;
      while not adotable.eof do
        begin
       adotable.delete;
       adotable.Next
      end;好像不怎么好用??
    大家指正!!!
    谢谢!!!
      

  9.   

    function TForm1.emptytable(adotable:TADOTable): boolean;//实现table1.emptytable的函数
    var i:integer;
    begin
      if not adotable.active then
       adotable.Open;
      adotable.First;
      for i:=adotable.recordcount downto 1 do
        begin
          adotable.delete;
          adotable.Next;
        end ;
    end;
    ------------------------------------
    自己顶