多用户数据库程序 [英] Multi-user database program
问题描述
大家好...
我正在使用VB.NET和SQL SERVER 2005(VS 2008)开发多用户程序.
我已经做完差不多了,但是当我尝试将应用程序连接到SQL SERVER时,它给出一条错误消息,与服务器建立连接时发生了错误.连接到SQL Server 2005时,此故障可能是由于在默认设置下SQL Server不允许远程连接的事实.(提供者:SQL网络接口,错误:26-错误指定服务器/实例的位置).
我使用了以下连接字符串:
Hi all...
I am developing a multi-user program using VB.NET and SQL SERVER 2005 (VS 2008).
I''ve done almost but when I am trying to connect application to SQL SERVER, it gives an error message that "An error has occured while establishing a connection to the server. When connecting to SQL Server 2005,this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections.(provider:SQL Network Interface, error : 26 - Error Locating Server/Instance Specified).
I used the following connection string :
Dim conStr as String = "Data Source=192.168.1.200\SQLEXPRESS;Initial Catalog=demoDB;Integrated Security=True"
建议我该怎么办.
谢谢.
Gagan
Suggest me what should I do.
Thanks.
Gagan
推荐答案
该错误非常具体:检查SQL Server安装并确保已将其配置为用于远程连接.
还要检查您的SQL Server实例名称,并且该IP地址正确-它是基于LAN的IP,因此您的路由器很可能会根据设备加电的顺序对其进行动态分配.确保可以在Sever Explorer窗格中使用Visual Studio建立连接,并在属性窗格中查看数据库的ConnectionString属性.
The error is pretty specific: check the SQL server instalation and make sure it is configured for remote connections.
Also check your SQL server instance name, and that the IP is correct - it''s a LAN based IP, so it may well be dynamically assigned by your router depending on the order in which devices are powered up. Make sure you can make a connection using Visual Studio, in the Sever Explorer pane, and look at the ConnectionString property for the database in the properties pane.
选中此
在SQL Server上启用远程连接 [ ^ ]
Check this
Enable Remote Connection on SQL Server[^]
这篇关于多用户数据库程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!