This commit is contained in:
Kathy Ruffing 2012-06-11 16:20:03 +00:00
parent c9d962d01d
commit 136a023564
3 changed files with 14 additions and 9 deletions

View File

@ -45,8 +45,10 @@ namespace DataLoader
// The INF files contain a path to a corresponding NDX file - had data with bat NDX path // The INF files contain a path to a corresponding NDX file - had data with bat NDX path
DeleteINFFiles(pth); DeleteINFFiles(pth);
_OutTran = new OutsideTransition(cn); _OutTran = new OutsideTransition(cn);
frmMain.AddInfo("Before MigrateROFST{0}\r\n{1}", GC.GetTotalMemory(true), VEPROMS.CSLA.Library.CSLACache.UsageAll);
MigrateROFST(pth, docver); MigrateROFST(pth, docver);
GC.Collect(); GC.Collect();
frmMain.AddInfo("After MigrateROFST{0}\r\n{1}", GC.GetTotalMemory(true), VEPROMS.CSLA.Library.CSLACache.UsageAll);
// Migrate library documents // Migrate library documents
MigrateLibDocs(cn, pth); MigrateLibDocs(cn, pth);
// Initialize Dictionaries // Initialize Dictionaries

View File

@ -287,15 +287,17 @@ namespace DataLoader
int nBytesRead = fs.Read(ByteArray, 0, (int)len); int nBytesRead = fs.Read(ByteArray, 0, (int)len);
fs.Close(); fs.Close();
string t1 = (title == null || title == "") ? null : title; string t1 = (title == null || title == "") ? null : title;
Document doc = Document.MakeDocument(t1, ByteArray, null, ci == null ? null : ci.ToString(), dtsutc, "Migration", ".Doc"); using (Document doc = Document.MakeDocument(t1, ByteArray, null, ci == null ? null : ci.ToString(), dtsutc, "Migration", ".Doc"))
FileInfo tmpFile = new FileInfo(temppath); {
string docfile = temppath.Substring(0, temppath.LastIndexOf(".")) + @".doc"; FileInfo tmpFile = new FileInfo(temppath);
if (File.Exists(docfile)) File.Delete(docfile); string docfile = temppath.Substring(0, temppath.LastIndexOf(".")) + @".doc";
FileInfo doctmpFile = tmpFile.CopyTo(docfile); if (File.Exists(docfile)) File.Delete(docfile);
doc.DocAscii = ascii; FileInfo doctmpFile = tmpFile.CopyTo(docfile);
doc.Save(); doc.DocAscii = ascii;
File.Delete(docfile); doc.Save();
return doc.DocID; File.Delete(docfile);
return doc.DocID;
}
} }
// for an io exception, keep trying // for an io exception, keep trying
catch (IOException exio) catch (IOException exio)

View File

@ -174,6 +174,7 @@ namespace DataLoader
//figure = Figure.MakeFigure(rofst, roImg, null); //figure = Figure.MakeFigure(rofst, roImg, null);
using (Figure tfig = Figure.MakeFigure(rofst, roImg, null)) ; using (Figure tfig = Figure.MakeFigure(rofst, roImg, null)) ;
} }
roImg.Dispose();
} }
} }
else else