Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

New Connection fails during Add New Data Source Dialog

The Problem

If I have Visual Studio 2010, Service Pack 1 installed, and I go to Data, Add New Data Source and click Database, it brings up the standard Choose Your Data Connection wizard page.

On that page, if I have an existing connection configured, I can then select it, and add that data source to my project, no problems, no issues.

On the other hand, if I click New Connection... it just bombs out, wizard closes, as if I had done nothing. Now keep in mind, Visual Studio doesn't close, and there are no exceptions, errors, or warnings, the dialog window just disappears.

Unsuccessful Attempts to Resolve Issue

I've checked the simple things, using a debugger, and a valid machine config file, not sure what else I might be missing.

  1. Using a Debugger

    I tried starting a 2nd copy of Visual Studio as I did this, and attaching a debugger to the process, with all exceptions checked in my debug menu, and still nothing.

  2. Validating machine.config file is valid

    I backed up my machine.config file, and used another person's working machine's machine.config file, and I'm still having issues.

    I have since reverted back to my own machine.config file.

    I suspect the machine.config might be the issue, but I thought taking a working one should work, unless I'm missing one of the registered providers? I don't know enough about how this wizard works behind the scenes though, or what sections/lines of the machine.config file exactly drive the wizard.

  3. Uninstalling all third-party database providers

    I have recently tried uninstalling Oracle, SQLite, beta versions of SQL Server Compact Edition, and MySQL providers in hopes that one of them set a registry entry or configuration entry that was negatively impacting my ability to create new connections and the error still occurs.

  4. Reinstalling Visual Studio

    I reinstalled Visual Studio, complete uninstall, and reinstall, no extensions, or nothing, and the issue exists, definitely convinced its a configuration error at this point, I could use the expert opinion of someone who knows more about the configuration behind the scenes for this dialog though.

Any help in resolving the issue would be greatly appreciated.

like image 293
Brian Deragon Avatar asked Nov 21 '11 19:11

Brian Deragon


1 Answers

Visual studio 2012 solution.

Close visual studio.

Open the event viewer, go to Application Log, and find Errors with source devenv.

Mine said

The following information was included with the event: 

.NET Framework Data Provider for MySQL: An unexpected error occurred in the data provider.

Then i opened registry editor and went to:

HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0_Config\DataProviders\

And deleted the key that reffered to the faulty data provider

{c6882346-e592-4da5-80ba-d2eadcda0359}

(default) = .NET Framework Data Provider for MySQL

like image 134
Lefteris E Avatar answered Sep 30 '22 05:09

Lefteris E