Bug fix B2013-079 – Users can now use “{MENU}” in the DBConnection.xml file
so that they can specify a database in a PROMS shortcut (ex VEPROMS.EXE \DB=VEPROMS_xxx)
This commit is contained in:
parent
69b14e912c
commit
f8a3adcd32
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user