Add MySQL related tables into Data Source Visual Studio 2005

Wednesday, 10 February 2010 16:40
Print
User Rating: / 287
PoorBest 

How create data source in Visual Studio 2005  with data from MySQL tables with FK.

For example, create a new project C# Windows Application.

1. Select  menu  Data - Add New Data Source  Add new Data Source

2. On the wizard page "Shoose a Data Source Type" -  select Database and press Next

Choose a Data Source Type

3. Press button New Connection choose your data connection then  press button Change in "Data Source" selection.

Add connection

Then select Data source = Mysql Database and Data Provider = .NET Framework  Data Porvider for MySQL and press Ok.

Change data source

 

4. Specify the connection settings. Type field Server Name, User Name, Password. If necessary, change the specific settings by clicking Advanced.

Press "Test Connection" to verify the connection to the server MySQL. If successful click button OK.

Add new connection

5. On the wizard  press Next  then specify name of new connection.

6. On the wizard page "Shoose your database objects" - choose tables. Finish.

 

When you create a connection, use NET Framework Data Provider for MySQL
Connector-Net 6.2.2 http://dev.mysql.com/downloads/connector/net/