timestamp should be wrap with single quotes, eg
CALL AddMerchantProcessor(0, 1, '2012-01-01 00:00:00')
but it's not the proper way of using the Command object. The query should be parameterized.
Here's a little code snippet:
MySqlCommand comm = new MySqlCommand();
comm.Connection = cn;
comm.CommandType = CommandType.StoredProcedure;
comm.CommandText = "AddMerchantProcessor";
comm.Parameters.AddWithValue("m_id", m_id);
comm.Parameters.AddWithValue("p_id", p_id);
comm.Parameters.AddWithValue("d", d);
cn.Open();
comm.ExecuteNonQuery();
you need to:
- use
using statement for automatic object disposal
- put some
trycatch for proper exception handling
SOURCES