workgroup access connection from excel

S

Sean

Dim cnn As New ADODB.Connection
Dim rs As ADODB.Recordset
Dim dbName As String

Set cnn = New ADODB.Connection
dbName = "K:\Admin\Health and Safety Training.mdb"
cnn.Provider = "Microsoft.Jet.OLEDB.4.0"
cnn.Open dbName, "user", "user"

I have the above code to connect to an access database with workgroup
accounts. I get the following error when it gets to the last line of code ->
"Cannot start your application. The workgroup information file is missing or
opened exclusively by another user". The workgroup information file is in the
same folder as the database and not in use. "user" is the UID as well as PWD

any help?

thanx
 
S

Sean

found it ... just in case someone else needs it

Dim MyConn As ADODB.Connection
Set MyConn = New ADODB.Connection


MyConn.Provider = "Microsoft.Jet.OLEDB.4.0"
MyConn.Properties("Data Source") = "K:\Admin\Health and Safety
Training.mdb"
MyConn.Properties("Jet OLEDB:System database") = "K:\Admin\Health and
Safety.MDW"
MyConn.Open UserID:="user", Password:="user"
 

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

Top