本文介绍了从另一台计算机访问mssql数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在笔记本电脑上安装了mssql数据库,并创建了一个c#应用程序
,用于存储数据并将数据检索到数据库中。这是正常工作,我尝试创建一个对等网络,并在第二台计算机上安装c#应用程序,并尝试访问第一台笔记本电脑上的SQL数据库,但无法访问它。请任何人帮我配置。
这是使用的连接字符串
i have installed mssql database on my laptop and i have created a c# application
that stores and retrieve data into the database. this is working normally, i try creating a peer to peer network and installed the c# application on the second computer and try accessing the sql database on the first laptop but was not able to access it. please can any one help me out with the configuration.
this is the connection string used
SqlConnection conn = new SqlConnection(ConfigurationSettings.AppSettings["ConnectionString"]);
conn.ConnectionString = "Data Source=USER-PC;Initial Catalog=CENTRALDB;User ID=sa;Password=mike";
conn.Open();
推荐答案
这篇关于从另一台计算机访问mssql数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!