I am trying to connect to an Access DB using a standard ADO connection object. This runs perfectly when I do not set a password for the database;
Dim cn As Connection
Set cn = New Connection
With cn
.Provider = "Microsoft.jet.OLEDB.3.51"
.ConnectionString= "Userid=Admin;" & _
"DataSource=C:\Test.mdb"
.Open
End With
However on setting the password in the Access DB & running the following code again, with the password string included:
Dim cn As Connection
Set cn = New Connection
With cn
.Provider = "Microsoft.jet.OLEDB.3.51"
.ConnectionString= "Userid=Admin;" & _
"Password=test;DataSource=C:\Test.mdb"
.Open
End With
I get the following error message:
Runtime Err: '-2147467259 (80004005)'
"Can't start your application. The workgroup information file is missing or opened exclusively by another user"
Could somebody please advise?
Thanks very much in advance.
Hugh
vb6sp4
msaccess97
wos95
Dim cn As Connection
Set cn = New Connection
With cn
.Provider = "Microsoft.jet.OLEDB.3.51"
.ConnectionString= "Userid=Admin;" & _
"DataSource=C:\Test.mdb"
.Open
End With
However on setting the password in the Access DB & running the following code again, with the password string included:
Dim cn As Connection
Set cn = New Connection
With cn
.Provider = "Microsoft.jet.OLEDB.3.51"
.ConnectionString= "Userid=Admin;" & _
"Password=test;DataSource=C:\Test.mdb"
.Open
End With
I get the following error message:
Runtime Err: '-2147467259 (80004005)'
"Can't start your application. The workgroup information file is missing or opened exclusively by another user"
Could somebody please advise?
Thanks very much in advance.
Hugh
vb6sp4
msaccess97
wos95