From 31e844b42fa2fd392d10584dc226583a14e83bbf Mon Sep 17 00:00:00 2001 From: Kathy Date: Thu, 2 Mar 2023 14:08:40 +0000 Subject: [PATCH] =?UTF-8?q?B2023-020=20=E2=80=93=20Link=20to=20RO=20data?= =?UTF-8?q?=20from=20new=20working=20draft=20crashes/update=20ro.fst=20iss?= =?UTF-8?q?ues?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PROMS/VEPROMS User Interface/frmVersionsProperties.cs | 11 ++++++++++- .../Generated/DocVersionAssociation.cs | 10 ++++++---- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/PROMS/VEPROMS User Interface/frmVersionsProperties.cs b/PROMS/VEPROMS User Interface/frmVersionsProperties.cs index 9c54446b..196b5239 100644 --- a/PROMS/VEPROMS User Interface/frmVersionsProperties.cs +++ b/PROMS/VEPROMS User Interface/frmVersionsProperties.cs @@ -1484,7 +1484,16 @@ namespace VEPROMS foreach (DocVersionAssociation dva in _DocVersionConfig.MyDocVersion.DocVersionAssociations) { - RODbInfo rdi = RODbInfo.Get(dva.ROFst_RODbID); + // B2023-020: Link to RO data from new working draft crashes/various ro.fst issues. This code was using an + // non-loaded rodbid from the docversion association (query was changed to not return related rofst data + // to improve memory/performance). Instead, the SelectedROFst can be used to get the rodbid. + int rodbid = SelectedROFst==null?-1:SelectedROFst.RODbID; + if (rodbid < 1) + { + MessageBox.Show("Could not get associated ro.fst ", "No existing RO.FST"); + return; + } + RODbInfo rdi = RODbInfo.Get(rodbid); // B2023-020: use the rodbid from the SelectedROFst string rofstPath = rdi.FolderPath + @"\ro.fst"; if (!File.Exists(rofstPath)) diff --git a/PROMS/VEPROMS.CSLA.Library/Generated/DocVersionAssociation.cs b/PROMS/VEPROMS.CSLA.Library/Generated/DocVersionAssociation.cs index 2257d29b..ec86d357 100644 --- a/PROMS/VEPROMS.CSLA.Library/Generated/DocVersionAssociation.cs +++ b/PROMS/VEPROMS.CSLA.Library/Generated/DocVersionAssociation.cs @@ -434,12 +434,14 @@ namespace VEPROMS.CSLA.Library _DTS = dr.GetDateTime("DTS"); _UserID = dr.GetString("UserID"); dr.GetBytes("LastChanged", 0, _LastChanged, 0, 8); - _ROFst_RODbID = dr.GetInt32("ROFst_RODbID"); + // B2023-020: setting RO Database on new working draft crashes. Query 'getAssociationsByVersionID' had been modified + // for memory improvements to not return the ROFst values, so don't Get the values. Comment out for now. + //_ROFst_RODbID = dr.GetInt32("ROFst_RODbID"); //_ROFst_ROLookup = (byte[])dr.GetValue("ROFst_ROLookup"); _ROFst_ROLookup = null; // B2022-026 RO Memory reduction - use ROlookup of null to know if we loaded the RO.FST file - _ROFst_Config = dr.GetString("ROFst_Config"); - _ROFst_DTS = dr.GetDateTime("ROFst_DTS"); - _ROFst_UserID = dr.GetString("ROFst_UserID"); + //_ROFst_Config = dr.GetString("ROFst_Config"); + //_ROFst_DTS = dr.GetDateTime("ROFst_DTS"); + //_ROFst_UserID = dr.GetString("ROFst_UserID"); } catch (Exception ex) // FKItem Fetch {