How can I remove access to temporary ldb db access file

I have an ASP.NET project. I connect to the database and then close and delete the connection object. But when someone logs into my site, MS Access creates a temporary name dbname.ldb. When I want to download my original mdb file from my server, it will not allow me to access the mdb file. I can not do anything if there is an ldb file on the server. It locks the mdb file and I cannot move it. So what's the problem? I open the connection and close it. So why this ldb file is not deleted after the connection is closed.

+3
source share
6 answers

The connection can be left open if the scripts throw an error of any type before closing it. Check the scripts with a custom error page 500, which logs errors in the text file, and you will see if this is the case. In any case, the ldb file is not dangerous, so you can create a script to delete them once a day or so. This is one of the shortcomings in the work of web applications with MS Access. Try switching to MSSQL if you can either in MySQL, this last can be used from .NET or classic ASP without problems with ADO or ADO.NET with the appropriate driver.

+2
source

- IIS . IIS , IIS -, ( , - ).

, Access .

+3

.ldb .mdb Access. , , Jet , - . , , Jet .

, :

  • .
  • , .

, : , .
, .

CodeProject: "" - ASP.NET.

+2

- , # (30 ? 60 ?), , . .

+2

.ldb :

  • .ldb
  • .
+1

GC.Collect() :)

0

Source: https://habr.com/ru/post/1710808/


All Articles