Exemplo n.º 1
0
        public Boolean WriteLoadErrors(LoadErrorData theE)
        {
            OleDbCommand theCMD;
              String theSQL = "";

              try
              {
            checkOpen();
            theSQL = "INSERT INTO [FeatureLoadProblems] ([SerialNumber], [sourceClass], [destinationClass], [srcObjectID], [problemDescription]) VALUES (" + theE.serialNumber + ", '" + theE.srcClass + "', '" + theE.destClass + "', " + theE.Count + ", '" + theE.errMsg + "')";
            theCMD = new OleDbCommand(theSQL, theConn);
            theCMD.ExecuteNonQuery();
            return true;
              }
              catch (Exception ex)
              {
            return false;
              }
        }
Exemplo n.º 2
0
 public void AddProblemLoad(LoadErrorData theErr)
 {
   if (this.theErrors == null)
   {
     System.Array.Resize(ref this.theErrors, 1);
     this.theErrors[0] = theErr;
     loadErrors = 1;
   }
   else
   {
     Boolean makeNew = true;
     for (int p = 0; p < this.theErrors.Length; p++)
     {
       if (this.theErrors[p].errMsg == theErr.errMsg.ToString()) { this.theErrors[p].Count += 1; makeNew = false;  }
     }
     if (makeNew)
     {
       System.Array.Resize(ref this.theErrors, this.theErrors.Length + 1);
       this.theErrors[this.theErrors.Length - 1] = theErr;
       loadErrors += 1;
     }
   }
 }