Click here to Skip to main content
15,881,809 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
How can I connect to a MySQL database from Windows Forms?

pls tel me step by step i am alredy install mysql connecter.
Posted
Comments
Rahul VB 1-Feb-14 1:29am    
This was something i was searching for, but never googled :)

Hope this will help you

How to Connect to MySQL Using C#[^]
 
Share this answer
 
Seriously? Google has hundreds of examples. http://stackoverflow.com/questions/13716450/c-sharp-mysql-example-command-executereader-throws-exception[^] was the first that I found through a Google search.

C#
//you need to add the correct references and using statements
using(MySqlConnection db = new MySqlConnector(MyConnectionString))
{
  db.Open();
  //Now add the code that retrieves from the database.
}
 
Share this answer
 
Comments
[no name] 31-Jan-14 5:46am    
+5...
Rahul VB 1-Feb-14 1:30am    
Thanks +5
Problem solved just add dll from mysql server to my project
 
Share this answer
 
Dear All Thanks you for your valuable time and for my support keep in touch problem was solved .
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900