在客户端运行软件时遇到问题 [英] having problem in running software on client side

查看:90
本文介绍了在客户端运行软件时遇到问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这个连接字符串



connectionString =Data Source = .; Integrated Security = SSPI; Initial Catalog = sms; Persist Security Info = False; Connect Timeout = 60;



而且,它在我的系统上完美运行。



但是,当我跑我客户端系统上带有此连接字符串的软件。我收到一个错误,因为建立与SQL Server的连接时出现与网络相关或特定于实例的错误。未找到服务器或无法访问服务器。验证实例名称是否正确以及SQL Server是否配置为允许远程连接。(提供者:SQL网络接口,错误:26 - 错误定位指定的服务器/实例)



在我的客户端系统中,sql server 2008有一个实例名称 SQLEXPRESS并将连接字符串更改为



connectionString =Data Source = .\\SQLEXPRESS; Integrated Security = SSPI; Initial Catalog = sms; Persist Security Info = False;连接超时= 60;



但结果是同样的错误。



请告诉我如何解决这个问题。

I have this connection string

connectionString = "Data Source=.;Integrated Security=SSPI;Initial Catalog=sms;Persist Security Info=False;Connect Timeout=60";

And, its running perfectly on my system.

But, when i run the software with this connection string on my client's system. I am getting an error as "A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)"

In my client's system sql server 2008 has an instance name "SQLEXPRESS" and changed the connection string to

connectionString = "Data Source=.\\SQLEXPRESS;Integrated Security=SSPI;Initial Catalog=sms;Persist Security Info=False;Connect Timeout=60";

but the result was the same error.

Please tell how can i resolve this problem.

推荐答案

Data Source =应该指向服务器运行SQL服务器。 意味着连接到我的本地计算机,你可能没有安装SQL [客户端系统]。



将其更改为SQL Server的IP地址即数据来源= 192.168.1.1 \\SQLEXPRESS等。
"Data Source = " should point to the server which is running the SQL server. "." means connect to my local machine and you probably don't have SQL installed there [the clients system].

Change it to the IP address of the SQL Server i.e. "Data Source = 192.168.1.1\\SQLEXPRESS" etc.


这篇关于在客户端运行软件时遇到问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆