public static bool ConnectDatabase(MaddogDataBase dataBaseType = MaddogDataBase.OrcasTS) { bool isConnect = false; string mdsql = "mdsql3"; string dataBaseName = "OrcasTS"; switch (dataBaseType) { case MaddogDataBase.OrcasTS: break; case MaddogDataBase.Whidbey: mdsql = "mdsql2"; dataBaseName = "Whidbey"; break; default: break; } try { MadDogObjects.Utilities.Security.AppName = "Reporter XDT"; MadDogObjects.Utilities.Security.AppOwner = Environment.UserName; MadDogObjects.Utilities.Security.SetDB(mdsql, dataBaseName, "MDReadWrite", "Cujo"); isConnect = true; } catch (Exception ex) { string msg = "Unable to connect Maddog database: " + dataBaseType.ToString() + "\n" + ex.Message + "\n" + ex.StackTrace; } return isConnect; }
public static bool ConnectDatabase(MaddogDataBase dataBaseType = MaddogDataBase.OrcasTS) { bool isConnect = false; string mdsql = "mdsql3"; string dataBaseName = "OrcasTS"; switch (dataBaseType) { case MaddogDataBase.OrcasTS: break; case MaddogDataBase.Whidbey: mdsql = "mdsql2"; dataBaseName = "Whidbey"; break; default: break; } try { MadDogObjects.Utilities.Security.AppName = "Reporter XDT"; MadDogObjects.Utilities.Security.AppOwner = Environment.UserName; MadDogObjects.Utilities.Security.SetDB(mdsql, dataBaseName, "MDReadWrite", "Cujo"); isConnect = true; } catch (Exception ex) { string msg = "Unable to connect Maddog database: " + dataBaseType.ToString() + "\n" + ex.Message + "\n" + ex.StackTrace; } return(isConnect); }