C#SQL连接Express [英] C# SQL Connection Express

查看:534
本文介绍了C#SQL连接Express的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

伙计们,我在朋友计算机上尝试了我的应用程序,但该应用程序正常工作,不得不更改连接字符串.现在,我回到自己的计算机上,发生了以下错误,我已查看了该错误的一般帮助,并尝试了所提供的帮助,但没有成功,关于可能出了什么问题的任何想法,请先感谢.


建立与SQL Server的连接时发生与网络相关或特定于实例的错误.服务器未找到或无法访问.验证实例名称正确,并且已将SQL Server配置为允许远程连接. (提供者:SQL网络接口,错误:26-指定服务器/实例时出错)

Hey guys I tried my application on my friends computer and it worked, had to change the connection string. Now I am back on my own computer the following error has occured, I have looked at general help for this error and tried the help given but it hasn''t worked, any idea on what could have gone wrong, thanks in advance.


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)

推荐答案

如果SQL Server的实例名称不正确,则会发生上述错误与connection string.
中给出的名称匹配 运行SQL Server Management Studio,在连接服务器"表单中检查Server name,然后用该名称替换connection string中的服务器名称.
The above error occurs if the instance name of the SQL Server does not match the name given in the connection string.
Run the SQL Server Management Studio, check the Server name in the connect to server form and replace the server name in the connection string with this name.


这篇关于C#SQL连接Express的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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