Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
635 views
in Technique[技术] by (71.8m points)

ms access - ADODB Connection String: Workgroup Information file is Missing?

I have a few data sources in access that I need to connect to programatically to do things with behind the scenes and keep visibility away from users.

Said datasource has a password 'pass' as I'm going to call it here. Using this connection method I get an error attempting to use the open method

Dim conn as ADODB.Connection
Set ROBBERS.conn = New ADODB.Connection
conn.open "Provider=Microsoft.Jet.OLEDB.4.0;" _
        & "Data Source=\pep-homeprojectsillingautobillingDPBilling2.mdb;" _
    & "Jet OLEDB:Database Password=pass;", "admin", "pass"

"Cannot start your application. The workgroup information file is missing or opened exclusively by another user."

Due to planning to move into 2007, we are not using nor have ever used a workgroup identification file through access. The database password on the data source was set through the Set Databa Password which had to be done on an exclusive open.

Ive spent a good while changing around my connection options, where to put the passwords etc and either cannot find the right format, or (why I'm asking here) I think there may be some other unknown that I must setup to do this. Anyone out there got some useful information?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Your connection string seems to be incorrect. Try:

conn.open "Provider=Microsoft.Jet.OLEDB.4.0;" _
& "Data Source=\pep-homeprojectsillingautobillingDPBilling2.mdb;" _
& "Jet OLEDB:Database Password=MyDbPassword;"

-- http://www.connectionstrings.com/access


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...