private MySqlCommand GetCommand(string procedureName)
{
MySqlCommand cmd = null;
// only one request at a time.
lock (getCommandSync)
{
// create the command
cmd = new MySqlCommand();
cmd.CommandType = System.Data.CommandType.StoredProcedure;
cmd.Connection = connection;
cmd.CommandText = procedureName;
cmd.Prepare();
}
return cmd;
}