diff --git a/PROMS/VEPROMS.CSLA.Library/Generated/Database.cs b/PROMS/VEPROMS.CSLA.Library/Generated/Database.cs index 0d05942c..a997f4af 100644 --- a/PROMS/VEPROMS.CSLA.Library/Generated/Database.cs +++ b/PROMS/VEPROMS.CSLA.Library/Generated/Database.cs @@ -85,9 +85,18 @@ namespace VEPROMS.CSLA.Library System.Xml.XmlDocument xd = new System.Xml.XmlDocument(); xd.Load(cnOverride); System.Xml.XmlNode xn = xd.SelectSingleNode("DBConnection/@string"); + // bug fix: B2013-079 + // If we are using the DBConnection.xml file, + // Check to see if "{MENU}" is being used and if a database was specified (ex."VEPROMS.EXE \DB=VEPROMS_xxx") + // If both conditions are true, then call the ChooseDatabases() funtion which will return a valid connection string (we hope) + // otherwise use the connection string as it is in the DBConnection.xml if (xn != null) { - return _VEPROMS_Connection = xn.InnerText; + if (xn.InnerText.Contains("{MENU}") && SelectedDatabase != null && SelectedDatabase.Length > 0) + _VEPROMS_Connection = ChooseDatabase(xn.InnerText); + else + _VEPROMS_Connection = xn.InnerText; + return _VEPROMS_Connection; } } // Otherwise get the value from the ConfigurationManager