You must Sign In to post a response.
  • Category: .NET

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

    Hi All,

    I want to connect with database but when I clicked on add connection the message-box shows -
    "Unable to add data connection. the given key was not present in the dictionary"

    Please help me to add data connection.

    I am using SQL Server 2008 R2 and Visual Studio 2010 Premium
  • #657014
    Can you please specify where you are clicking the button and what is the connection string you have used. Please use the connection string as


    Data Source=myServerAddress;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;

    Thanks & Regards
    Anil Kumar Pandey
    Microsoft MVP, DNS MVM

  • #657041
    Hi,

    If you are using Visual studio 2010 then try to delete the folder mentioned in below path and see if it works or not. There is one more work around provided in Microsoft Connect you may try that also if this doesn't work:

    C:\Users\...\AppData\Local\Microsoft\VisualStudio\10.0

    Select Workaround tab and follow the instructions,
    connect.microsoft.com/VisualStudio/feedback/details/572005/server-explorer-vs2010-data-connection-problem


    Regards,
    Asheej T K

  • #657057
    Hello,

    You may try the following steps to see if it helps:

    a) Try to run devenv /ResetSettings (in command prompt) to eliminate the related potential settings problem.

    b) Try disabling Add-ins (e.g. "Tools" | "Add-in Manager") or run "devenv.exe /SafeMode".This can eliminate the possibility that third party Add-ins or packages are causing problems. (For more detailed VS command line switches information, see: http://msdn2.microsoft.com/en-us/library/xee0c8y7.aspx )

    c) Try creating a new project. Sometimes corrupted project settings can cause problems. These are project specific.

    d) Try to reboot the operating system to safe mode. This can help to isolate whether any other applications are interfering with Visual Studio. Note that some features (like IIS) are not available under safe mode. Please check whether this can be applied or not. In addition to safe mode, we can also try "clean boot": How to configure Windows XP to start in a "clean boot" state http://support.microsoft.com/kb/310353 .

    e) Try to create a new user account. This can help isolate user profile corruption related causes.

    In addition, Microsoft Visual Studio 2010 Ultimate RC has been released, you could get it from here:
    http://www.microsoft.com/downloads/details.aspx?FamilyID=457bab91-5eb2-4b36-b0f4-d6f34683c62a&displaylang=en

    NareshReddy


  • This thread is locked for new responses. Please post your comments and questions as a separate thread.
    If required, refer to the URL of this page in your new post.