Problem I have is when I run a SQL UPDATE on different fields, but the same WHERE criteria in my SQL statement one produces a change, and the other does not.
This produces no rows affected:
DateTime now = DateTime.Now;
OleDbCommand cmd = new OleDbCommand("UPDATE shifts SET end_log=@end_log WHERE profile_id=@profile_id;");
cmd.Parameters.AddWithValue("@profile_id", profileID); // profileID is a string
cmd.Parameters.AddWithValue("@end_log", now.ToString());
Whereas if I ran this, one row is affected:
OleDbCommand cmd = new OleDbCommand("UPDATE shifts SET closing=true WHERE profile_id=@profile_id;");
cmd.Parameters.AddWithValue("@profile_id", profileID);
My shifts table has the following fields:
profile_id - Short Text
end_log - Date/Time
closed - Yes/No
You can assume the tables hold the same data in both instances (this is automatically loaded and only contains one record).
Anyone spot any errors?