sean
sean

Reputation: 9268

Adding Connection to Visual Studio 2010

I'm new to Visual Studio C#. I'm creating a timekeeping system. I have MySQL as a database sever. I already added MySQL.data as a reference. My question is how can i add connection in Visual Studio 2010

Upvotes: 0

Views: 2165

Answers (1)

Bibhu
Bibhu

Reputation: 4081

Goto "View" tab, select the "Server Explorer", right click on the "Data Connections" and select the "Add connection" in the context menu, to add a new connection to your MySQL database.

A "Choose Data Source" window will open asking you to select the database type, select "Other" item from the list, then selct then select the data provider you want from the dropdownlist. Click "continue". Then "Add connection" window will appear, select the "Data Source Specification" in it, over here you can select the data source name("Refresh if don't find MySQL") or you can provide the Connection String to connect to the database.

Provide the "UserName" and "Password". Then hit the "Test Connection" button to make sure everyt hing is working as expected.

Upvotes: 2

Related Questions