B2023-020 – Link to RO data from new working draft crashes/update ro.fst issues

This commit is contained in:
Kathy Ruffing 2023-03-02 14:08:40 +00:00
parent f7dab80b86
commit 31e844b42f
2 changed files with 16 additions and 5 deletions

View File

@ -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))

View File

@ -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
{