如何连接Access数据库存在于网络上 [英] How to connect Access Database exists on Network

查看:97
本文介绍了如何连接Access数据库存在于网络上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的应用程序中,我使用过微软访问数据库,现在我想在网络中使用这个应用程序。因此,我将数据库放入网络并尝试访问数据库。但是收到错误

In my application i''ve used Microsoft access database, now i want to use this application in a network. So that i put the database in the network and trying to access the database. But getting error

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



这是我的代码:


Here is my code:

static string constr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\Biswa-PC\\Billing\\DB.mdb;Exclusive=1;Password=pass123;";
OleDbConnection con = new OleDbConnection(constr);
con.Open();





请指导我如何在网络上访问此数据库。



提前致谢。



Please guide me how to access this database on the network.

Thanks in advance.

推荐答案

使用密码连接到访问数据库时应使用

Provider = Microsoft.Jet.OLEDB.4.0; Data Source = \\Biswa-PC\\Billing\\DB.mdb; Exclusive = 1; Jet OLEDB:Database 密码= pass123;



请注意这个应该使用Jet OLEDB的数据部分:数据库密码而不仅仅是连接字符串中的密码;
When connecting to an access database with a password you should use
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\Biswa-PC\\Billing\\DB.mdb;Exclusive=1; Jet OLEDB:Database Password=pass123;"

Please note the bolded part of this where you should use Jet OLEDB:Database Password and not just password in the connectionstring;


这篇关于如何连接Access数据库存在于网络上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆