如何使用映射的网络驱动器通过数据源 (ODBC) 连接到 Access 数据库?

发布于 2024-09-13 19:48:57 字数 331 浏览 12 评论 0原文

我需要连接到 Access 数据库。为了做到这一点,我创建了一个系统 DSN。我使用本地文件成功建立了该连接。

但是,数据库必须位于远程服务器上,并且我映射了网络驱动器,以便可以访问数据库文件。映射驱动器并使用远程文件,当我尝试访问数据库时出现错误:

[Microsoft][ODBC Microsoft Access Driver] 无法启动您的应用程序。工作组信息文件丢失或由其他用户独占打开. 如果

我使用本地计算机中的数据库文件,则不会出现该错误。但是从网络驱动器访问该文件,则会抛出异常。您知道为什么会发生这种情况吗?

谢谢......

I need to make a connection to an Access Database. In order to do that I created a System DSN. I had success making that connection using local files.

However, the database must be at a remote server and I mapped a network drive so I can access the database files. Mapping the drive and using the remote files, an error arises when I try to access the database:

"[Microsoft][ODBC Microsoft Access Driver] Cannot start your application. The workgroup information file is missing or opened exclusively by another user.
"

If I use the database files in the local machine, the error doesn't appear. But accessing the file from the network drive, the exception is throw. Do you know why it happens?

Thanks....

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

妄断弥空 2024-09-20 19:48:57

这听起来很奇怪,但请将您的 AD 域添加到您的互联网选项中的受信任站点。

因此,如果您的计算机是 ad.mycompany.com 的成员,请使用它。

我遇到过类似的情况,两个人试图在网络驱动器上打开同一个 MDB。

This will sound odd, but add your AD domain to your Trusted Sites in your internet options.

So if your computer is a member of ad.mycompany.com, use that.

I had something similar happen with two people trying to open up the same MDB on a network drive.

世态炎凉 2024-09-20 19:48:57

我发现了问题。

调用我的代码的应用程序是一个在 SYSTEM 帐户下运行的 Windows 服务。该帐户无权访问服务器外部的文件。

系统管理员将创建一个特殊帐户,我需要将其用作服务登录帐户。

I found the problem.

The application invoking my code is a windows service that is running under the SYSTEM account. This account doesn't have permissions to access files outside the server.

A system administrator will create a special account and I need to use it as the service log on account.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文