public bool TestConnect() { try { connection.Open(); connection.Close(); } catch (Exception ex) { connection.Close(); utils.GetLogUtil().WriteLog(ex.Message); return(false); } return(true); }