示例#1
0
 public static void RunDataPatch(DatabaseConnection dbConn, string Filename)
 {
     strLastErrorMessage = string.Empty;
     try
     {
         string       FullPath    = System.IO.Path.Combine(System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"DBPatch"), Filename);
         FileInfo     dbPatchFile = new FileInfo(FullPath);
         StreamReader reader      = dbPatchFile.OpenText();
         string       PatchString = reader.ReadToEnd();
         reader.Close();
         AppUtils.DBPatch(dbConn, PatchString, out strLastErrorMessage);
     }
     catch (Exception ex)
     {
         strLastErrorMessage = ex.Message;
     }
 }
示例#2
0
 public void RunDataPatch(string Filename)
 {
     strLastErrorMessage = string.Empty;
     try
     {
         string                 FullPath    = System.IO.Path.Combine(System.IO.Path.Combine(HROneWebPath, @"DBPatch"), Filename);
         System.IO.FileInfo     dbPatchFile = new System.IO.FileInfo(FullPath);
         System.IO.StreamReader reader      = dbPatchFile.OpenText();
         string                 PatchString = reader.ReadToEnd();
         reader.Close();
         AppUtils.DBPatch(dbConn, PatchString, out strLastErrorMessage);
     }
     catch (Exception ex)
     {
         strLastErrorMessage = ex.Message;
     }
 }