连接到远程数据库时出现问题 [英] Problem in connecting to remote database

查看:79
本文介绍了连接到远程数据库时出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
这是东西.我在MS Access中有一个数据库.我已经创建了一个必须访问该数据库的应用程序.现在这个数据库
在另一台机器上.让我们称之为pc1. pc1和我的机器在同一无线网络中.但是当我尝试连接到数据库时,连接失败.是否需要连接互联网,或者有解决方法?让我放我正在使用的连接字符串.请让我知道它是否有问题.

Provider=Microsoft.ACE.OLEDB.12.0;Data Source=\\xxx.xxx.xxx.xxx\\C:\\Users\\user1\\Documents\\DB1.accdb;

谢谢
Ajinkya

Hey guys,
Here''s the thing. I have a database in MS access. I have made an application that has to access this DB. Now this database
is on another machine. Lets call it pc1. pc1 and my machine are in same wireless network. But when i try to connect to the database connection fails. Do need to put on internet or is there a workaround for this? let me put connection string i am using for this. Please let me know if there''s anything wrong with it.

Provider=Microsoft.ACE.OLEDB.12.0;Data Source=\\xxx.xxx.xxx.xxx\\C:\\Users\\user1\\Documents\\DB1.accdb;

Thanks
Ajinkya

推荐答案

您可以看到此链接
点击
单击
单击
You can see this links
Click
Click
Click


如果您是通过本地网络使用的,则尝试使用网络映射驱动器
例如. \\ xxx.xxx.xxx.xxx \\ C:\\ Users \\ user1 \\将此网络目录连接到Z:并写入您的连接字符串,例如<pre>Provider=Microsoft.ACE.OLEDB.12.0;Data Source=z:\\DB1.accdb;</pre>
if you are using this from local network then try with Network Mapping Drive
E.g. \\xxx.xxx.xxx.xxx\\C:\\Users\\user1\\ connect this Network directory to Z: and write your connection string like <pre>Provider=Microsoft.ACE.OLEDB.12.0;Data Source=z:\\DB1.accdb;</pre>


& lt; add key ="dbConnection" value =数据库= xxxxxx;数据源= xx.xx.xxx.xxx;用户ID = xx;密码= xx4;连接超时= 50000"/>
&lt;add key="dbConnection" value="Database=xxxxxx;Data Source=xx.xx.xxx.xxx;User Id=xx;Password=xx4;connection timeout = 50000"/&gt;


这篇关于连接到远程数据库时出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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