fixed a TimeSpan overflow error where it added time spent on datasets that were not processed (happens when merging databases) and resulted in a number that made no sense for the time function, causing the program to stop
This commit is contained in:
		@@ -40,7 +40,7 @@ namespace DataLoader
 | 
			
		||||
			long lTime = DateTime.Now.Ticks;
 | 
			
		||||
			string pth = docver.Title;
 | 
			
		||||
			// if the Title is empty, return because this docversion has already been migrated.
 | 
			
		||||
			if (pth == null || pth == "") return TimeSpan.FromTicks(lTime);
 | 
			
		||||
			if (pth == null || pth == "" || pth == "Title") return TimeSpan.FromTicks(0);
 | 
			
		||||
			MultiUnitCount = docver.DocVersionConfig.Unit_Count;
 | 
			
		||||
			if (MultiUnitCount > 0)
 | 
			
		||||
			{
 | 
			
		||||
@@ -54,7 +54,8 @@ namespace DataLoader
 | 
			
		||||
					New2OldApple.Add(i, oldindex);
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
			if (!File.Exists(pth + @"\set.dbf") || !File.Exists(pth + @"\curset.dat")) return new TimeSpan();			// Open connection
 | 
			
		||||
			if (!File.Exists(pth + @"\set.dbf") || !File.Exists(pth + @"\curset.dat")) return TimeSpan.FromTicks(0);			
 | 
			
		||||
			// Open connection
 | 
			
		||||
			OleDbConnection cn = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + pth + ";Extended Properties=dBase III;Persist Security Info=False");
 | 
			
		||||
			if (convertProcedures)
 | 
			
		||||
			{
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user