如何连接到网络SQL Server数据库 [英] how to connect to network SQL server database
问题描述
大家好,
我创建了一个带有sql server作为数据库的Windows应用程序。该应用程序在localhost上工作正常,但没有链接到服务器数据库。它在sql连接中显示Issue的消息。
以下是我在模块中使用的连接字符串,我在服务器上的sql配置管理器中启用了TCP / IP并禁用了防火墙。
请建议..
公共连接为新SqlConnection(数据源= \\WIPRO-PC\SQL2012 ;初始目录=数据库;用户ID = sa;密码= 1233456)
这里WIPRO-PC是我能够通过运行打开的hte服务器的名称和SQL2012是实例的名称
还将服务器配置为接受来自不同计算机的连接 - 它可以配置为仅接受来自localhost的连接。
Hi All,
I have created a windows app with sql server as database. The app is working fine on localhost but not getting linked to server database. it shows message of Issue in sql connection.
Following is the connection string I am using in module and I have enabled TCP/IP in sql configuration manager on Server and disabled the firewall.
Pls suggest..
Public connection As New SqlConnection("Data Source=\\WIPRO-PC\SQL2012;Initial Catalog=database;User ID=sa;Password=1233456")
Here WIPRO-PC is the name of hte server which I am able to open through run and SQL2012 is the name of the instance
Also configure the server to accept connections from different computers - it may be configured to accept connections from localhost only.
这篇关于如何连接到网络SQL Server数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!