本文介绍了ADODB 连接字符串:缺少工作组信息文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一些数据源可供访问,我需要以编程方式连接到这些数据源,以便在幕后处理事情并让用户无法看到.

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.

所说的数据源有一个密码pass",我将在这里调用它.使用此连接方法尝试使用 open 方法时出现错误

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."

由于计划进入 2007 年,我们没有使用,也从未通过访问使用过工作组标识文件.数据源上的数据库密码是通过 Set Databa Password 设置的,必须在独占打开时完成.

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?

推荐答案

您的连接字符串似乎不正确.试试:

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

这篇关于ADODB 连接字符串:缺少工作组信息文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

05-19 07:49