OK guys here is the deal. I some of you are software engineers like me and most of the ppl are into IT in some form. So I believe a knowledge sharing system would be really nice since we have lot of members here.
OK I will start. This is Visual C# Code that I recently came up with to 'remotely' log into a MySQL database and access records. Its not copy right reserved or anything so feel free to make modifications to it if u like. Im fully open source.
Before u try this code u will have to download the mysql connector/net, it is located at: Click Here
Next add reference to: MySql.Data in your project
Next add "using MySql.Data.MySqlClient;" in your declaration section.
Try the code below.
Ok that should connect you remotely to your MySQL Database and retrieve a record from the table named customers. If there are any questions pls post it here. I will try to answer.

OK I will start. This is Visual C# Code that I recently came up with to 'remotely' log into a MySQL database and access records. Its not copy right reserved or anything so feel free to make modifications to it if u like. Im fully open source.
Before u try this code u will have to download the mysql connector/net, it is located at: Click Here
Next add reference to: MySql.Data in your project
Next add "using MySql.Data.MySqlClient;" in your declaration section.
Try the code below.
Code:
private void button1_Click(object sender, System.EventArgs e)
{
string conPara = "SERVER=localhost;" +
"DATABASE=db1;" +
"UID=testuser;" +
"PASSWORD=testpassword;";
MySqlConnection connection = new MySqlConnection(conPara);
MySqlCommand statement = connection.CreateCommand();
MySqlDataReader Result;
statement.CommandText = "select * from customers";
connection.Open();
Result = statement.ExecuteReader();
while (Result.Read())
{
string thisrow = "";
for (int i= 0;i<Reader.FieldCount;i++)
thisrow+=Result.GetValue(i).ToString() + ",";
listBox1.Items.Add(thisrow);
}
connection.Close();
}
Ok that should connect you remotely to your MySQL Database and retrieve a record from the table named customers. If there are any questions pls post it here. I will try to answer.

