Access db connection error.
I am using VB 6.0 with an Access database. The program worked fine until I password protected the database. Now I am getting the following error:
"Cannot start your application. The workgroup information file is missing or opened exclusively by another user."
The path is correct and I did open the database exclusively to set the password, but then closed it. The following is the connection string I am using. I can get it to work with an ODBC connection, but I don't want to use that.
VB Code:
Set Conn = New Connection
Conn.ConnectionString = "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data source=" + App.Path + "\database.mdb;password=pword"
'The following one works
'Conn.ConnectionString = "PROVIDER=MSDASQL;Data Source=Support;password=pword"
Conn.open
Please help!
Re: Access db connection error.
If you set a database password then try this connectionstring.
VB Code:
Conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\database.mdb;Jet OLEDB:Database Password=MyDbPassword;"
Re: Access db connection error.
That worked! Thank you so much! Why is the connection string different than the standard? It seems like there are so many different combinations....
Re: Access db connection error.
Its because your using a database password vs a user password. You can find all your connectionstring needs over at http://www.connectionstrings.com :)