Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Access DB connection string

Posted on 2008-10-07
2
Medium Priority
?
312 Views
Last Modified: 2010-04-21
Hi,
I have a working connection to my access DB Mydb.mdb (access 2003) as shown
<%
connStr = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("../_database/Mydb.mdb")
%>

I used security option to put in a password on the DB and changed the string to
connStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
Server.MapPath("../_database/Mydb.mdb") & ";Password=MyPassword;"

Now I get the following error

Microsoft JET Database Engine error '80040e4d'
Cannot start your application.
The workgroup information file is missing or opened exclusively by another user.

I sure this is the correct password and need help fixing the problem.
Thanks





0
Comment
Question by:alberte
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 85

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 1000 total points
ID: 22660864
You need to include the path to the Workgroup file ... include "SystemDB=Server.MapPath("SomePathHere"):

connStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
Server.MapPath("../_database/Mydb.mdb") & ";SystemDB=Server.MapPath("SomePathHere");Password=MyPassword;"

You might need to consult with your ISP to determine exacty where your workgroup file is located, or (if you can) you can simply upload your "system.mdw" file to a location on your server and point the SystemDB variable to there.
0
 

Author Closing Comment

by:alberte
ID: 31503893
I used
connStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\...\Mydb_db.mdb;Jet OLEDB:Database Password=MyPass;"

Works
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
Instead of error trapping or hard-coding for non-updateable fields when using QODBC, let VBA automatically disable them when forms open. This way, users can view but not change the data. Part 1 explained how to use schema tables to do this. Part 2 h…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
Suggested Courses

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question