How Can I Remove Access Db's temporary ldb file

Ibrahim AKGUN picture Ibrahim AKGUN · Jun 18, 2009 · Viewed 21.8k times · Source

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.

Answer

Cade Roux picture Cade Roux · Jun 19, 2009

Your web application within IIS is keeping the connection open with connection pooling. The IIS application will eventually close if there are no further connections within the time IIS is set to terminate your web application or you can restart the application (and copy the file before anyone gets in).

That's just one reason Access is not a good choice of database for this kind of application.