Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

trace code to find how a duplicate record is being created 1

Status
Not open for further replies.

Lhuffst

Programmer
Jun 23, 2003
503
US
Hi Everyone,

An existing database that has been working fine for the last 5 years is all of the sudden coming up with duplicate records ocassionally and I am trying to figure out how this could occur.

This key field is an autonumber and when the user clicks the command button new, it inserts the new id number and immediately retrieves that id number and displays blank fields for the new record. The user fills in the rest of the info and clicks the command save button. This goes to an update routine.

Today when I looked at the table, it appears that the user inserted the new record at 11:15 am and then updated the record at 11:58. However, instead of it updating the record, it inserted the entire record as a new record with a new key field. I have tried to track this through several times and have not been able to a duplicate record. I spoke with the user and followed the same sequence of events that he he did and still am unable to create a duplicate so I am posting this message in hopes that someone else has run across this and can give some guidance.

A sample of the records is:

key proj contract num fee user createdate
115 US Army
116 US Army 10OS1118 2700 8925 07/28/09 11:58:01 am
[/color blue]
Thanks
Lhuffst
 
PEBKAC?
it appears that the user inserted the new record at 11:15 am and then updated the record at 11:58

Looks to like that is exactly what happened. That would explain why you are unable to recreate the situation. Could it be that the user created the record and accidentally saved it before completing it? Then maybe decided to try to go back and fill in the missing info, but clicked on the "new record" button instead, or tried to update before the first insert was comitted?

If quizzes are quizzical, what are tests?
 
hadn't thought of that. It is possible Thanks for the idea.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top