Some background: We have developed an ASP.NET MVC port of a client's MS Access application. The Application used/uses MySQL as the data store via ODBC. What we're running into is that if the client uses the MS Access application to capture a new record, and soon after the MVC application captures a new record, the MVC application's record seems to overwrite the last record created by the Access application, as well as creating a second record.
So in effect, the Access application's record would look like this at first
ID | NAME | SURNAME
1 | joe | Schmoe
but then, when the MVC application creates its one record, this happens:
ID | NAME | SURNAME
1 | james | smith
2 | james | smith
The MVC application seems to overwrite both the last record captured by Access, as well as creating a new record.
We use Entity Framework 5. All we do to save the record is
var record = new Person(){NAME = "james", SURNAME = "smith"};
db.People.Add(record);
db.SaveChanges();
This type of thing only happens when the client has used the Access application. And it only happens when the last added record is from the Access application and the new record is from the MVC/EF application.
Any input would be appreciated.
When capturing a sequence of records via Access, this does not happen. When capturing a sequence of records via Entity Framework, it does not happen. When capturing first via Entity Framework and THEN Access, this does not happen. It only happens when the sequence is Access first, Entity Framework second.