如何使用本地或Lan连接从另一个项目中获取数据库 [英] How Can I Database From Another Project Using Local Or Lan Connection
本文介绍了如何使用本地或Lan连接从另一个项目中获取数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好朋友,
我创建了C#.net的Windows应用程序并创建了安装文件。我安装了机器(1和2)的安装文件。在第一台机器上我使用数据库(如员工) .i想使用LAN连接为2台机器使用相同的数据库。
是否可以在2台机器上安装设置但仅使用第1台机器的数据库。
请帮助me.plzz..m new here。
谢谢
Hello friends,
I create windows application of C# .net and also create setup file.I install setup file for machine(1 and 2).In 1st machine i use database(like Employee).i want to use same database for 2 machine using LAN connection.
Is it possible i install setup in 2 machine but use database use only from 1st machine.
Please help me.plzz..m new here.
Thanks
推荐答案
数据源=你的分心IP,您的端口;网络库= DBMSSOCN;
初始目录=您的数据库名称;用户ID =您的用户名;密码=您的密码;
例子
数据来源= 192.168.100.10,1433;网络库= DBMSSOCN;
初始目录=员工;用户ID = csharp;密码= csharp123;
希望这会对你有所帮助......
Data Source=Your distination IP,Your port;Network Library=DBMSSOCN;
Initial Catalog=Your Database Name;User ID=Your Username;Password=Your Password;
Example
Data Source=192.168.100.10,1433;Network Library=DBMSSOCN;
Initial Catalog=Employee;User ID=csharp;Password=csharp123;
Hope this will help you...
是的,有可能你必须包括IP连接字符串中的系统而不是本地服务器
yes it is possible u have to include the IP of that system in connection string instead of local server
是的。这是可能的。使用连接字符串
yep. Its possible. Use Connection string
这篇关于如何使用本地或Lan连接从另一个项目中获取数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文