My program is writing records to a db table. So far, it has written about 58 new records to this table. All of a sudden, I get an error message saying "Row not found or changed." Which is odd, because I'm inserting a new record, not trying to find one or update an existing one. Here's the small bit of code that I'm using to create an object and then insert to the table:
// create new comment object
var comment = new Comment
{
TableName = "Circuit",
TableKey = circuitId,
Text = remarks,
CreatedOn = DateTime.Now,
CreatedByName = "loadCC03Circuits",
CreatedByUupic = "000000000"
};
cimsContext.Comments.InsertOnSubmit(comment);
cimsContext.SubmitChanges();
I'm not quite sure what to do, at this point. Each field has a value, there are no nulls. And, as I said, 58 records have already been written out by this very same bit of code before this happens so, other than the data being off (which, according to the field values in my debugger session, are not) I'm not quite sure what else to check. Any advice?
EDIT: I added an answer below that made this problem go away. But, I'm not sure why this solution worked.