connecting to access database with a set password

reddzer

Member
Joined
Apr 20, 2007
Messages
6
Programming Experience
Beginner
hi,

I am using the following connection string to connect to an access database "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Path\databaseName.mdb;Password=pass"

i have set the database password in the access database to "pass". when i run the program i get the following error:
"Cannot start your application. The workgroup information file is missing or opened exclusively by another user"

is there away to fix this.

thanks,
 
That isnt how you open an access database with a password. This is:


Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Path\databaseName.mdb;Persist Security Info=True;Jet OLEDB:Database Password=pass


The Password field is for the USER password, not the database password. Youre using .NET 2, you should be doing this in the visual designer, for a list of other properties you set, click the Advanced button when youre setting up the connection. If you dont know how you should be setting up the connection then read the dw2 link in my signature, section on creating a simple data app
 
Back
Top