diff --git a/PROMS/VEPROMS User Interface/frmRODbProperties.cs b/PROMS/VEPROMS User Interface/frmRODbProperties.cs index 81b27130..f0381c40 100644 --- a/PROMS/VEPROMS User Interface/frmRODbProperties.cs +++ b/PROMS/VEPROMS User Interface/frmRODbProperties.cs @@ -107,7 +107,7 @@ namespace VEPROMS // as the assocation. if it's a new path, i.e. a modify of the rodb record, just save current data. // Then close & return. if ((_origROName !=null && _origFolderPath !=null && (_origROName != ppRTxtName.Text || _origFolderPath != ppTxtPath.Text)) || - (_origSQLConnect != ppTxtSQL.Text || _origSQLConnect != ppTxtSQL.Text)) + (_origSQLConnect != null && _origSQLConnect != ppTxtSQL.Text)) // B2020-011 fix check for change in sql connection string { if (!Directory.Exists(ppTxtPath.Text)) { @@ -121,7 +121,9 @@ namespace VEPROMS } RODb roDb = RODb.GetJustRoDb(_roDbInfo.RODbID); if (_origROName != ppRTxtName.Text) roDb.ROName = ppRTxtName.Text; - if (!(_origSQLConnect == "cstring" && (ppTxtSQL.Text == null || ppTxtSQL.Text == "")) && _origSQLConnect != ppTxtSQL.Text) + if (_origSQLConnect == null && (ppTxtSQL.Text == null || ppTxtSQL.Text == "")) // B2020-011 fix check when connecting to an access database + roDb.DBConnectionString = "cstring"; + else if (!(_origSQLConnect == "cstring" && (ppTxtSQL.Text == null || ppTxtSQL.Text == "")) && _origSQLConnect != ppTxtSQL.Text) { // C2017-003: ro in sql. 'cstring' in connection string represents using MS Access database // if connect string is null, set connect string to "cstring" otherwise, use what user typed in: