public Boolean WriteDataLoss(DataLossEntries theE) { OleDbCommand theCMD; String theSQL = ""; try { checkOpen(); theSQL = "INSERT INTO [DataLossProblems] ([SerialNumber], [sourceClass], [destinationClass], [sourceFieldName], [srcObjectID], [dataLoadError]) VALUES (" + theE.serialNumber + ", '" + theE.srcClass + "', '" + theE.destClass + "', '" + theE.srcAtt + "', " + theE.ObjectID + ", '" + theE.errMsg + "')"; theCMD = new OleDbCommand(theSQL, theConn); theCMD.ExecuteNonQuery(); return true; } catch (Exception ex) { return false; } }
public void AddDataLoss(DataLossEntries theE) { if (theLoss == null) { System.Array.Resize(ref this.theLoss, 1); this.theLoss[0] = theE; } else { System.Array.Resize(ref this.theLoss, this.theLoss.Length + 1); this.theLoss[this.theLoss.Length - 1] = theE; } this.dataLoss += 1; }