无法在Visual Studio中创建数据连接

编程入门 行业动态 更新时间:2024-10-23 21:26:48
本文介绍了无法在Visual Studio中创建数据连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在尝试在Visual Studio中创建一个新的数据连接(这样我就可以为EF创建实体模型)并收到以下错误消息:

I'm trying to create a new data connection in Visual Studio (so that I can create an entity model for EF) and I get the following error message:

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

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身份验证信息(由于使用不同的域,Windows身份验证是不可能的)。我可以使用SQL Server Management Studio连接到同一客户端计算机上的数据库实例。我遇到麻烦的机器是运行Windows 7 64位。我有另一台运行Windows XP 32位的机器,并且创建连接没有问题。

The server name and instance are correct as is my SQL Server authentication information (due to the use of different domains, Windows authentication is not possible). I can connect to the database instance on the same client machine using SQL Server Management Studio. The machine I'm having troubles with is running Windows 7 64-bit. I have another machine running Windows XP 32-bit and there are no problems creating the connection.

另外,我确实读过有时你需要指定传输协议的地方(即tcp: ServerName / InstanceName)但也无法解决问题。

Also, I did read somewhere about how sometimes you need to specify the transport protocal (i.e. tcp:ServerName/InstanceName) but that also does not resolve the problem.

推荐答案

我看不到你的连接字符串是什么样的,但是你可能想查看下面的论坛帖子,看看它是否有任何帮助:

I don't see what your connection string looks like, but you may want to check the below forum post to see if it's of any help:

social.msdn.microsoft/Forums/en-US/sqldataaccess/thread/7b719395-915d-415c-b1ce-9a2476830431

更多推荐

无法在Visual Studio中创建数据连接

本文发布于:2023-11-09 05:41:23,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1571524.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:数据   Visual   Studio

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!