private int InsertProblem(Problem p) { BaseDb db = DbFactory.ConstructDatabase(); int ret = -1; try { ret = db.AddProblem(p); } catch (SystemException ex) { outerror.InnerHtml = "<b>An exception of type " + ex.GetType() + " was encountered while attempting to roll back the transaction. Message:</b> <br/><br/> <i>" + ex.Message + "</i>"; } db.Close(); return(ret); }