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
相应的
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
楼主可以用SQL语句自己清空表,很简单的一条语句就可以了。如
ADOQuery.SQL.add('Delete from Table');
那adotable ???我想用它
谢谢
不如用ADOQUERY好用
ADOQuery.SQL.add('Delete from Table');
不过用ADOTABLE 也可以实现
ADOTABLE.FIRST;
while not adoquery.eof do begin
adotable.delete;
adotable.next;
end;
用bde
table1.emptytable 就可以了阿 !
再次求助!
谢谢各位!
只有Table有
换条路走吧。
if not adoquery.eof then
begin
adotable.delete;
else
adotable.next;
end;
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;好像不怎么好用??
大家指正!!!
谢谢!!!
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;
------------------------------------
自己顶