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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Duplicate Records

Status
Not open for further replies.

ThrillKillKult

Programmer
Mar 23, 2005
3
US
I am using VB.NET with Microsoft Access 2000 to design a program for a company. In testing, we have found that occassionally an error will pop up that states that the program is attempting to duplicate a record that already exists in the table. The thing is, the only primary key in the table is autonumbered, so it should not be duplicating records. The only way to fix the problem is to create a clean database and a clean table, then copy the information from one database to the other. Is there any way that anyone knows of to circumvent this problem, or am I going to have to get the company to get a new database program?
 
First off Welcome to Tek-tips! When you have time take a look at faq222-2244 for information on how to get the most from the forums.

Secondly, this sounds like an MS Access issue. I would make sure that the primary key is set up correctly and that my code is not trying to enter or update that key in any way. Is the start value of the autonumber being reset in any way? Also your question might be better received in the appropriate MS Access forum (more
Access experts). Search for the Access forums at the top of this page.

Also when and if you have a question regarding VB.Net use the VB.net forum (forum796).

zemp
 
I would be especially suspicious of any code that inserts a new record and then tries to determine the ID of the new inserted row.

Oh, and nice username: TKK.
 
The code that I have generated does not edit, update, change or delete the primary key -- it is left alone in the code. But I will try posting this on an Access forum instead. Thanks for your help.

And Sheco - thanks for the compliment.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top