我用ADOquery连接FoxPro表,想将里面的数据全删除
这样写:
try
if tbBookQuery.Active=True then
tbBookQuery.Close;
tbBookQuery.SQL.Text:='delete from tbbook';
tbBookQuery.ExecSQL;
{tbBookQuery.SQL.Text:='select * from tbbook';
tbBookQuery.open;
while not tbBookQuery.Eof do
begin
tbBookQuery.Delete;
tbBookQuery.Next;
end;}
except
showmessage('不能上传数据!');
Exit;
end;
showmessage('have been deleted');
{}里面是另外一种写法,结果都是在FoxPro表里还有数据,但再次用ADOquery查询时有查不到数据,不知道怎么办?
这样写:
try
if tbBookQuery.Active=True then
tbBookQuery.Close;
tbBookQuery.SQL.Text:='delete from tbbook';
tbBookQuery.ExecSQL;
{tbBookQuery.SQL.Text:='select * from tbbook';
tbBookQuery.open;
while not tbBookQuery.Eof do
begin
tbBookQuery.Delete;
tbBookQuery.Next;
end;}
except
showmessage('不能上传数据!');
Exit;
end;
showmessage('have been deleted');
{}里面是另外一种写法,结果都是在FoxPro表里还有数据,但再次用ADOquery查询时有查不到数据,不知道怎么办?
解决方案 »
- 在DBGRID中如何使行处于选中状态
- 如何让QRDBTEXT中的值只保留2位小数?谢谢
- 非活动窗口能不能捕获鼠标事件?
- Delphi + MySQL , 一个奇怪的查询问题 , 具体情况请进来看看.
- 我我要暴走了~~~~~~5555 还是关于query查询`~
- 如何把IE的Google Toolbar加到自己的应用程序中?100人民币!
- 如何将我的考勤人事系统与考勤机相连(高分相送)
- 一个只有高手才能解决的问题:我的delphi数据库程序在我的机子上调试完全正常,可到了一台只装了OS加MDAS2.6 的机子上时,在数据库查询时
- 急!急!急!急!!!dephi内部封装报表问题
- 我的程序中引用了 TWebBorwser 控件,显示了一些内容,不固定,如何知道当前鼠标在哪个图片上呢?
- 账套是怎么做的。
- 怎样用TCP协议传输多媒体文件,比如mp3,或者.RM文件(较大)?
全部删除用Zap即可
如果要物理删除该怎样做呢?
to zxkid
请告知Zap的用法,最好针对上面的程序写一端源代码
其实对用户来说是一样的,删除后已经查不到了,这就行了。
delete from table1 where xxx='xxx' 吧
tbBookQuery.SQL.add('delete from tbbook');试试