Search

Unable to create Data Connection in Server Explorer by Rick Strahl [old]

Active

8
0
Sign in
to vote
Type: Bug
ID: 552006
Opened: 4/16/2010 5:15:33 PM
Access Restriction: Public
1
Workaround(s)
6
User(s) can reproduce this bug
I'm unable to create new Data Connections in Server Explorer. After the new Connection Dialog shows up I get:

Unable to add data connection
The given key was not present in dictionary
Details (expand)

Product Language

English

Visual Studio Version

Visual Studio 2010

Operating System

Windows 7

Operating System Language

English

Steps to Reproduce

Open Server Explorer
Add Connection
Add a SQL Server connection
Test to make sure connection is valid
OK

Unable to add data connection
The given key was not present in dictionary

The data connections list is not empty. There's one entry for a VistaDb connection and VistaDB is no longer installed. However, Refresh works - it's the new connection that fails to add to the list apparently.

Side note: I deleted all other connections that existed which included several .sdf connections. Before all were deleted even a refrshe of the list would cause the above error to occur.

Actual Results

Unable to add data connection
The given key was not present in dictionary

Expected Results

No error - my connection added to connections

Note: This breaks a number of other things in VS: The ADO Entity Framework add dialog works of the connection list and it also fails. I'm unable to create an EF or L2S diagram.
      You can indicate your satisfaction with how Microsoft handled this issue by completing this quick 3 question survey.

 

File Attachments
0 attachments
Sign in to post a comment.
Posted by OrhanCINAR on 6/26/2011 at 5:11 AM
I had the same error in vs2010. The sqlite provider had some problems with vs2008 and i have uninstalled it. After that i could not add connections to vs2010 because in the server explorer still remianing old sqlite connections. I installed sqlite provider again and solved my problem.
Posted by godzy on 12/7/2010 at 2:51 AM
I also got the message "Unable to add data connection. The given key was not present in the dictionary.". It happened when I was trying to add connection to new a database with SQL Server Compact Edition provider. Just before that I had uninstalled Sqlite provider downloaded from http://sqlite.phxsoftware.com/.
Posted by jv_getmore on 7/15/2010 at 9:16 AM
One other symptom.. when I double click the SDF file it failes to open saying "Data provider identified by guid 189a64e1-04ea-46d2-8479-62711571314a could not be loaded" ... so I

FINALLY GOT IT...

for this guid was assigned to Devart.Sqlite provider I have just removed. So after more digging I have found where the ServerExplorer stores its connections and then removed the wrong connections.
The path is (on win vista/7) similar to C:\Users\...\AppData\Roaming\Microsoft\VisualStudio\10.0\ServerExplorer\DefaultView.SEView
You may ofc just simply delete the file :)


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

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

Posted by jv_getmore on 7/15/2010 at 7:19 AM
oh and it also happends to me that I have duplicate connections in the Server explorer...

BTW. there is a duplicate issue on https://connect.microsoft.com/VisualStudio/feedback/details/572005/server-explorer-vs2010-data-connection-problem?wa=wsignin1.0
Posted by jv_getmore on 7/15/2010 at 7:00 AM
It happens to me to. I have DevArt SQLite provider installed, created few data connections, then uninstalled it. The data connections disappeared (of course this would be expected), however error mentioned above started to appear.
Does not matter what kind of connection (provider) do I trying to add. Allways throws this error.. Kind of like the uninstall corrupted some file where the connections are stored (and yes, the VS crashed while the uninstall was in process).

However I have deleted the C:\Users\...\AppData\Local\Microsoft\VisualStudio\10.0 however no luck in this..

Where elsewhere are the connection strings saved?
Posted by Xiaoying Guo on 5/5/2010 at 6:54 PM
Hi vzaffiro,

I'm not sure how mindscape simpleDB extension works. But seems it messed up SQL Server providers when you uninstalled it (perhaps the SQL Server providers were deleted as well with the extension. just a guess). You'll need to re-install the providers to make it work again.

Thanks,
Xiaoying
Posted by vincent.zaffiro on 5/5/2010 at 1:54 PM
Have the same issue. I added the mindscape simpleDB extension and then deleted it. now I can't add any SQL connections to Server Explorer
Posted by Xiaoying Guo on 4/27/2010 at 10:19 PM
Hi,

Since we haven't heard from you for 7 days, I'll have to resovle it. The problem would be probably due to the data provider isn't correctly installed.

Thanks,
Xiaoying
Posted by Xiaoying Guo on 4/21/2010 at 7:57 PM
Hi,

May I know if it happens to every data connection that you tend to add or just against a specific connection? Besides, what else related to data / framework / development tools did you install on your machine?

Thanks,

Xiaoying Guo
Program Manager, Visual Studio Business Applications Tooling
Posted by Microsoft on 4/18/2010 at 10:01 PM
Thanks for your feedback.

We are rerouting this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.

Thank you
Sign in to post a workaround.
Posted by jv_getmore on 7/15/2010 at 9:19 AM
this is not really a workaround but in fact a SOLUTION, how to get rid of the error:

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


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

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