can't start application because of password in Access

  • Thread starter Thread starter bob
  • Start date Start date
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
 
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.
 
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.

??
 
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;"
 
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
 
Back
Top