Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/291.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/jquery-ui/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 如何将我的应用程序连接到SQL Server?_C#_Sql Server 2008 - Fatal编程技术网

C# 如何将我的应用程序连接到SQL Server?

C# 如何将我的应用程序连接到SQL Server?,c#,sql-server-2008,C#,Sql Server 2008,我有一台电脑(Windows Server 2003+SQL Server 2008) 和2台电脑(MS SP2+我的应用程序) 如何让我的应用程序在其他PC上连接到sql server 2008我的应用程序将连接到服务器以在sql server 2008中存储数据并读取/删除/编辑(基本操作) 最好的方法是什么 注意:我的应用程序是用C#(.NET平台)编写的 从 你有: 通过IP地址连接 Data Source=190.190.200.100,1433;Network Library=D

我有一台电脑(Windows Server 2003+SQL Server 2008)

和2台电脑(MS SP2+我的应用程序)

如何让我的应用程序在其他PC上连接到sql server 2008我的应用程序将连接到服务器以在sql server 2008中存储数据并读取/删除/编辑(基本操作)

最好的方法是什么

注意:我的应用程序是用C#(.NET平台)编写的

从 你有:

通过IP地址连接

Data Source=190.190.200.100,1433;Network Library=DBMSSOCN;InitialCatalog=myDataBase;User ID=myUsername;Password=myPassword;
DBMSSOCN=TCP/IP。这就是如何使用TCP/IP而不是命名管道。在数据源的末尾是要使用的端口。1433是SQL Server的默认端口