Visual Studio添加数据连接-字典中不存在给定键 [英] Visual Studio Adding Data Connections - Given Key not Present in the Dictionary

查看:135
本文介绍了Visual Studio添加数据连接-字典中不存在给定键的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经阅读了几个之前的类似问题,但似乎都没有提供解决方法. 所以我再问一次. 我正在使用Visual Studio,并尝试连接到服务器资源管理器中的数据库.无论我尝试连接到哪个数据库,都会出现在字典中不存在给出的键"错误. 我已经尝试使用SQL CE和SQL Express 2008数据库,并且每个数据库都给出相同的问题.

I've read through a couple of previous similar questions and none seem to provide a fix. so i ask again. I'm using Visual Studio and am trying to connect to a DB in Server Explorer. Regardless of what database i try to connect to it gives a "Given Key not Present in the Dictionary" error. i have tried with SQL CE and SQL Express 2008 databases and each give the same issue.

我可以很容易地与SQL Management Studio Express连接,所以我相信数据库是相同的.

I can connect quite easily with SQL Management Studio Express so i believe the Databases are the same.

在此先感谢.

推荐答案

很多次寻找答案之后,我找到了解决方法

after a lot of time searching for the answer to this i found the solution here

这实际上不是解决方法,但实际上是一种解决方案,该方法可以消除错误,以防万一您在删除提供程序之前错过了删除所有连接的操作:

this is not really a workaround but in fact a SOLUTION, how to get rid of the error, in case you have missed to remove all connections before removing the provider:

编辑C:\ Users ... \ AppData \ Roaming \ Microsoft \ VisualStudio \ 10.0 \ ServerExplorer \ DefaultView.SEView并手动删除与错误提供程序的连接.如果您不知道哪个提供程序失败,只需删除文件即可:)

edit C:\Users...\AppData\Roaming\Microsoft\VisualStudio\10.0\ServerExplorer\DefaultView.SEView and remove the connection with the wrong Provider manually. If you do not know which of the provider is failing, simply delete the file :)

如果这无济于事,请尝试同时删除C:\ Users ... \ AppData \ Local \ Microsoft \ VisualStudio \ 10.0

If this won't help try deleting also C:\Users...\AppData\Local\Microsoft\VisualStudio\10.0

PS:您必须先退出Visual Studio的所有实例,否则将从内存中重新创建文件..

PS: you have to quit all instances of visual studios first or the files will be re-created from memory ..

第二部分仅对我有用,删除了整个文件夹.

The second part only worked for me , deleting the whole folder.

这篇关于Visual Studio添加数据连接-字典中不存在给定键的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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