问题
I want to add a data connection in Visual Studio 2013. I want to use Xampp for hosting my database on localhost. I seted up my database with phpmyadmin. Now i want to add a connection in VS.
Under server explorer i choose add new data connection. I choose the micorosoft odbc data structure. Next i wanted to build a new connection string. But i cannot find a Mysql odbc driver for that. So i downloaded it directly from mysql http://dev.mysql.com/downloads/connector/odbc/ and installed it. I tried to restart my computer and VS but this driver still doesnt appear.
回答1:
I downloaded and installed this MySQL For Visual Studio first http://dev.mysql.com/downloads/windows/visualstudio/ then the connector http://dev.mysql.com/downloads/connector/net/
I have no problem connecting to MySQL. Make sure XAMPP MySQL running though when you trying to connect.
PS. I am using Visual Studio Ultimate 2013 and latest XAMPP. I have only installed MySQL Workbench and nothing else.
来源:https://stackoverflow.com/questions/24095003/visual-studio-xampp-data-connection