When I test the UPDATE statement while running in debug mode I can update 2 joint tables multiple times and in the physical database I can see the changes that have been done.The problem starts when I close the project solution and reopen it and then try and update it throws up an
int32 UpdatedRowStatusErrors.I set breakpoints to check but it just throws up {Unspecified Error}
This is the code for the UPDATE event
OleDbCommand update = new OleDbCommand("UPDATE Clockd SET ID =@ID,EmpNo =@EmpNo,[DateTime] =@DateTime," + "Calc0R1 =@Calc0R1,Calc2R1 =@Calc2R1,Calc3R1 =@Calc3R1,Calc4R1=@Calc4R1," +"TotalHours =@TotalHours,Target0R1=@Target0R1 WHERE ID =@ID",this.sourceConnection);
update.Parameters.Add("@ID", OleDbType.Integer, 4, "ID");
update.Parameters.Add("@EmpNo", OleDbType.VarChar, 51, "EmpNo");
update.Parameters.Add("@DateTime", OleDbType.Date, 4, "DateTime");
update.Parameters.Add("@Calc0R1", OleDbType.Double, 4, "Calc0R1");
update.Parameters.Add("@Calc1R1", OleDbType.Double, 4, "Calc1R1");
update.Parameters.Add("@Calc2R1", OleDbType.Double, 4, "Calc2R1");
update.Parameters.Add("@Calc3R1", OleDbType.Double, 4, "Calc3R1");
update.Parameters.Add("@Calc4R1", OleDbType.Double, 4, "Calc4R1");
update.Parameters.Add("@TotalHours", OleDbType.Double, 4, "TotalHours");
update.Parameters.Add("@Target0R1", OleDbType.Double, 4, "Target0R1");
this.oAdapter.UpdateCommand = update;
this.oAdapter.MissingSchemaAction = MissingSchemaAction.AddWithKey;
this.oAdapter.Update(table);
this.table.AcceptChanges();
MessageBox.Show("Records Updated");
I searched around but but the answers are very vague and unclear.
Any help would be appreciated
thanks