using (OleDbConnection conn = new OleDbConnection(ConnectionString))
using (OleDbConnection conn = new OleDbConnection(ConnectionString))
{
conn.Open(); //Error Occurs
using (OleDbCommand cm = conn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandText = "GetColorSerialPartNumber";
cm.ExecuteReader();
while (cm.ExecuteReader().Read())
{
Console.WriteLine(cm.ToString());
}
}
}
David SmithPosted Feb 8, 2012, 2:28 AM
David SmithPosted Feb 8, 2012, 1:33 AM
using (MySqlConnection conn = new MySqlConnection(ConnectionString))
{
//conn.Open();
using (MySqlCommand cm = conn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandText = "prc_GetColorSerialPartNumber";
cm.ExecuteReader();
while (cm.ExecuteReader().Read())
{
Console.WriteLine(cm.ToString());
}
}
}
David SmithPosted Feb 8, 2012, 1:24 AM
I am using OleDb instead of MySql.Data.MySqlClient, I am looking right at it in the app.config. I need to be hit by a bus, let me test anyway.
Satyapriya NayakPosted Feb 8, 2012, 12:20 AM
Please refer the below link
http://markalexanderbain.suite101.com/how-to-access-mysql-with-c-a115001
Thanks