0

For school, I had always used a local installation of Microsoft SQL Server for all of my database needs in C# WPF applications. Now, I am working on a project that needs access from the web, so I am using a web server that I have set up to allow remote MySQL connections. My WPF application will be used to manage all the data on the website.

In the past, I had always set up the MS SQL connection by right clicking the project in the solution folder, then Properties. Then in the settings menu, I would create a new configuration string with "Connection String" as the type. Then, I would click the elipses in the value box to set up the configuration properties.

When I click the "Change..." button next to the Data Source box, I don't see MySQL as an option for the Data Source. See the screenshot below for an example:

enter image description here

I have downloaded and installed the MySQL Connector/Net but I still don't see an option for MySQL in the connection string data source. How do I fix this?

I am running Windows 10 64-bit.

ShoeLace1291
  • 4,551
  • 12
  • 45
  • 81
  • This could be a 32/64 bit issue: Visual Studio cannot "see" your MySQL connector. You could try testing using the [Data Link Wizard](http://stackoverflow.com/questions/10479763/how-to-get-the-connection-string-from-a-database/10480011#10480011) by explicitly starting from a 32bit and 64bit console. (just drop .udl onto console) – Filburt Jun 15 '16 at 09:06
  • Have you set up an ODBC data source? In windows 7 - confusingly the 32bit ODBC Manager is found here "C:\Windows\SysWOW64\odbcad32.exe" & the 64bit ODBC Manager is here "C:\Windows\System32\odbcad32.exe". – PaulF Jun 15 '16 at 09:26
  • @PaulF that's not confusing, that where all 32-bit system files are found in a 64-bit system. This is transparent though, so there is no need to access `SysWOW64` directly. – Panagiotis Kanavos Jun 15 '16 at 09:34
  • @PanagiotisKanavos - for many non-tech savvy people looking in a folder called SysWOW64 for a 32bit application would not be the first choice. Made even more confusing by Microsoft not changing the application name - keeping _"odbcad32.exe"_ even for the 64bit version. Running "odbcad32.exe" or "Data Sources (ODBC)" from control panel runs the 64bit version by default & there are no obvious ways to run the 32bit version if required by a 32bit driver being installed on a 64bit system. – PaulF Jun 15 '16 at 09:47
  • @PaulF you are NOT supposed to go looking into SysWOW64. Non-technical people would press the `Windows` key and type ODBC. The 32-bit ODBC app is the very first choice. Another option is to go through the control panel, as in previous versions – Panagiotis Kanavos Jun 15 '16 at 09:50
  • @PaulF as for why, it isn't through some quirk or malicious intent on Microsoft's part. This is how 32-bit and 64-bit applications can work side-by-side without *ever* having to know they are running on a 64 bit system. 32-bit exes that look for System32 only see the files in SysWOW64. 64 bit files though, see those inside System32. – Panagiotis Kanavos Jun 15 '16 at 09:54
  • So obvious now you have explained it. – PaulF Jun 15 '16 at 10:04
  • Regardless, you practically need to wear a propeller hat to get this to work half the time. – Drew Jun 15 '16 at 13:37

0 Answers0