if FileExists(ExtractFilePath(Application.ExeName)+name) then //如果文件存在
begin
mdbread.ADOConnection3.Close;//当我执行这里的时候怎么还会有.ldb文件
if not DeleteFile(ExtractFilePath(Application.ExeName)+name) then
//ExtractFilePath(Application.ExeName)+name为mdb的路径
begin
application.Messagebox('不能删除文件!','系统提示',64);
end;
end;
各位大哥还有什么方法来来关闭这个mdb文件啊
我有急用啊!!
begin
mdbread.ADOConnection3.Close;//当我执行这里的时候怎么还会有.ldb文件
if not DeleteFile(ExtractFilePath(Application.ExeName)+name) then
//ExtractFilePath(Application.ExeName)+name为mdb的路径
begin
application.Messagebox('不能删除文件!','系统提示',64);
end;
end;
各位大哥还有什么方法来来关闭这个mdb文件啊
我有急用啊!!
mdbread.ADOConnection3.Close;
mdbread.ADOConnection3.Free;
简单的讲:不能删除的原因就是被其他程序独占访问了。