Hi to all
how to use MYSQL data base in my .net project
which is requirment for connect to mysql database
plz help me
thanks
How to connect MYsql with .net
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Imran Pervez34 reputationPosted Apr 11, 2011, 2:43 AM EDT
2. Add Reference "MySql.data" in your project
3. I send some code may be help full for u
using MySql.Data.MySqlClient;
MySqlConnection connection;
//open connection
if (this.OpenConnection() == true)
{
//create command and assign the query and connection from the constructor
MySqlCommand cmd = new MySqlCommand(query, connection);
//Execute command
cmd.ExecuteNonQuery();
//close connection
this.CloseConnection();
}
Sam HobbsRank #107 · 20.5K reputationPosted Apr 11, 2011, 10:55 PM EDT
It's that easy; if you did that before writing this question, you would have had the download in the amount of time it took for you to create this question.