protected override bool Save()
{
// since MySQL doesn't support altering the body of a proc we have
// to do some "magic"
try
{
string sql = editor.Text.Trim();
if (!IsNew)
{
// first we need to check the syntax of our changes. THis will throw
// an exception if the syntax is bad
CheckSyntax();
sql = ChangeSqlTypeTo(editor.Text.Trim(), "CREATE");
ExecuteSQL(GetDropSQL(Name));
}
ExecuteSQL(sql);
return true;
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, "MySQL", MessageBoxButtons.OK, MessageBoxIcon.Error);
return false;
}
}