DB Connection Problem


I have an web application using ASP and Access.  

This is my DB connection string:
      filePath = Server.MapPath("database/demo.mdb")
      Set oConn = Server.CreateObject("ADODB.Connection")
      oConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & filePath

and this is the string that I close the connection when user log out:

My question is, why .ldb alway presents?  Thanks.
Who is Participating?
QLJConnect With a Mentor Commented:
Ok, then think u need to add in the password and UserID to the access database... even if it is null. Dun leave it to default!
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=...;User ID=[]; Password=[];"
Either your opening the connection more than once, and not closing ALL connections, OR your never getting to the oConn.  The .ldb definitely disappears if done correctly.
Hi mcrmg,
Because the DB is opened by your ADO...

What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

because you have the database opened as an application? The .lbd is there is something has opened it, that includes a desktop application. Maybe your collegue has it opened and went home?
mcrmgAuthor Commented:
It is strange, that on my lcoal IIS, I never seen the ldb file, only when I oprn db in access.  But when I move this to server, ldb files created when I logged on..
Have you checked to see your security status for the access file?
Enable IUSR<computername> to have full control over the access files
See if it helps!
mcrmgAuthor Commented:

I set permission for certain user, before user get in to the application, they will have to enter username and password that I set up on server.
mcrmgAuthor Commented:
I will post back....thanks
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.