Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 271
  • Last Modified:

DB Connection Problem

Hi,

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:
oConn.close

My question is, why .ldb alway presents?  Thanks.
0
mcrmg
Asked:
mcrmg
1 Solution
 
alorentzCommented:
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.
0
 
mattisflonesCommented:
Hi mcrmg,
Because the DB is opened by your ADO...

Mattis
0
 
sybeCommented:
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?
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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..
0
 
QLJCommented:
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!
0
 
mcrmgAuthor Commented:
Hi,

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.
0
 
QLJCommented:
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=[];"
0
 
mcrmgAuthor Commented:
I will post back....thanks
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now