且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

MS通过C#访问中间数据库

更新时间:2022-11-25 11:00:12

您可以像这样使用数据库的网络共享位置.

You can use the network shared location of the database, like this.

Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\serverName\shareName\folder\myDatabase.mdb;User Id=admin;Password=;



请参见此处 [ ^ ]供参考.



See here[^] for reference.


您在网络上与MS Access数据库的连接仍然是文件访问权限,因此您必须确保从数据库共享数据库.服务器,以便客户端可以看到它,是的,您需要将ip添加到连接字符串中.

请注意,每当有连接字符串问题时,应使用的第一个资源是 www.connectionstrings.com
Your connection across the network to a MS Access db is still file access so you''ll have to make sure that the db is shared out from the server so that the client can see it at which point, yes, you will need to add the ip into the connection string.

As a note, whenever you have connection string questions, the first resource that you should use is www.connectionstrings.com