如何删除Access数据库的临时LDB文件 [英] How Can I Remove Access Db's temporary ldb file

查看:998
本文介绍了如何删除Access数据库的临时LDB文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个ASP.NET项目。我连接到数据库,然后关闭和处置的连接对象。但是,当有人进入我的网站,MS Access创建一个临时dbname.ldb。当我想从我的服务器下载我原来的mdb文件它不会让我访问mdb文件。我不能做任何事情,如果在服务器LDB文件。它锁定mdb文件,我可以不动它。那么,有什么问题吗?我打开连接,并关闭它。那么,为什么这个LDB文件不会删除自身后,连接关闭。

I have an ASP.NET Project. I am connecting to the DB and then closing and disposing of the connection object. But when anyone enters my site, MS Access creates a temporary dbname.ldb. When I want to download my original mdb file from my server it won't let me access the mdb file. I can't do anything if there is ldb file in server. It's locking mdb file and I can't move it. So what's the problem? I am opening connection and closing it. So why this ldb file not deleting itself after the connection is closed.

推荐答案

连接可以保持打开状态,如果脚本产生任何类型的错误之前将其关闭。检查脚本和一个自定义的错误500页,记录在文本文件中的错误,你会看到,如果是这种情况。但无论如何,六味地黄丸的文件是不会有危险,所以你可以创建一个脚本来每天一次左右将其删除。这是一个关于工作web应用MS访问的缺点之一。尝试迁移如果可以或到MySQL到MSSQL,最后可用于从.NET或传统的ASP没有问题与ADO或ADO.NET与此时,相应的驱动程序。

The connection can be left open if the scripts produces an error of any kind before to close it. Check the scripts with a customized error 500 page that logs in a text file the errors and you will see if this is the case. Anyway the ldb file is not dangerous so you can create a script to remove them once a day or so. This is one of the drawbacks about working web applications with MS Access. Try to migrate to MSSQL if you can or to MySQL, this last can be used from .NET or classic ASP with no problem with ADO or ADO.NET with the appropiate driver.

这篇关于如何删除Access数据库的临时LDB文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆