can't start application because of password in Access

B

bob

Hi,

I use a Access database for my asp.net application.
I use this connection string:
sConnectionString = "Provider = Microsoft.Jet.OLEDB.4.0; Data Source =
c:\mydb.mdb"

Now i put a pasword to the Access database and i changed the connection
string to:
sConnectionString = "Provider = Microsoft.Jet.OLEDB.4.0; Data Source =
c:\mydb.mdb; Password=mypassw"

But then i get the error:
"Can't start application. The file is missing or is open in exclusive mode
by another user"


I opened the first time the file in exclusive mode in order to put the
password, but then i reopened it without exclusive mode.


Any idea how to solve this?
Thanks
Bob
 
M

Mark Fitzpatrick

Instead of just the phrase Password, try using Database Password as I think
that's the more correct versoin for the JET driver.

Sometimes after opening an Access application it will stay locked for a
while. Look to see if there is a lock file with the same name as the
database in the directory. If so, try deleting the lock file and see if that
helps. Have you also tried rebooting in case the OS has a lock on it? I used
to have similar problems when I worked with Access and classic ASP and what
I ended up doing occasionally is creating a brand new Access mdb and dumping
the contents from the original into it to break the lock. It's a worste case
fix, but sometimes Access just gets something stuck in its mind and you
can't get around it.
 
B

bob

Hi Mark,

I changed it into:
sConnectionString = "Provider = Microsoft.Jet.OLEDB.4.0; Data Source =
c:\mydb.mdb; Database Password=mypassw"

My error is know:
"can't find isam-file"

The Access-file is closed and there is no lock file with the same name.

??
 
M

Mark Rae

I changed it into:
sConnectionString = "Provider = Microsoft.Jet.OLEDB.4.0; Data Source =
c:\mydb.mdb; Database Password=mypassw"

My error is know:
"can't find isam-file"

The Access-file is closed and there is no lock file with the same name.

??

Try this EXACTLY...

"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\mydb.mdb;Jet OLEDB:Database
Password=mypassw;"
 
J

JerryWEC

Bob, here is what I used last time of Access2000 db...

mADOConnection.Provider = "Microsoft.Jet.OLEDB.4.0;" & "User
ID=admin;Password=;"

Try using User ID... by default Access uses Admin for the user id. However
you or the person that created this database may have changed the user id.

Also, make sure you are out of Access completely before trying your code.
Access may have a lock on the database file.

If this does not work then create a new database in access using the default
user id and password. The default password in Access is no password as shown
above.

Hope this helps. JerryM
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top