Error Number = -2147467259 --duplicate record

Posted on 2003-03-24
Medium Priority
Last Modified: 2008-03-10
   I'm having trouble with my asp page, here is the error message that i got:

SQL Statement: INSERT INTO TimeSheet ([Programmer Name], [Date], [Unit Process], [Action], [Time Spent], [Completed], [Comments], [Project Name], [Environment Code], [Administration], [Carpe Number], [Task Name], [Task Description], [Description Name], [UniqueID], [DateCreated]) VALUES ('Myname', '03/24/2003', '', 'Architecture', 1, '', '', 'ProjectName', '', '', 'IT8145', 'PROJ0001', 'Analysis', '0001/5253', 0, '03/24/2003');
VBScript Errors Occured:

Error Number=-2147467259

Error Descr.=The changes you requested to the table were not successful because they would create duplicate values in the index, primary key, or relationship. Change the data in the field or fields that contain duplicate data, remove the index, or redefine the index to permit duplicate entries and try again.

Source=Microsoft VBScript runtime error

Primary Key are Sequence Number ( autonumber,No Duplicate), Programmer Name(Duplicate Ok), Date ( Dupplicate OK)
The SQL STATEMENT works fine before I change one of the field,sequence number(autonumber), from "Yes (Duplicate Ok)" to "Yes (No Duplicate)" in the Index field.  After I change that setting, I am getting 10% chance to have that error.
Is there anyone know what happen to my asp page??
Question by:joeyoungkc
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2

Author Comment

ID: 8196217
um...forget it, I set the Primary Key as Sequennce Number only and it works fine.

k, I will remove this question later.
LVL 34

Expert Comment

ID: 8196309
Well, it's pretty apparent you are getting duplicate records (duh).  Is there a chance your page is being submitted more than once with the same data?  Are you performing an insert when you should actually be doing an update (based on an existing record)?


Author Comment

ID: 8197422
It should be fine if the page submit more than one time becasue everything allow duplicate except Sequence number ( autonumber) and the sequencenumber should generate a new number everytime it add new record.
NO, this page is creating a new record, not update.
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

LVL 34

Expert Comment

ID: 8197434
Ok, so why would you want duplicates--If I submit your page 9 times, do you really want my time sheet entered 9times with only a identity field making it unique?

sounds like you're going to have a mess on your hands....

Author Comment

ID: 8198180
I can't do anything about it, it is what the system does, there has 19 fields + autonumber and u can have the same values in 18 fields and 1 different value in one field.
This question isn't dicussing about the system's format, it is about how come the autonumber generate a duplicate value.

Accepted Solution

Banath earned 0 total points
ID: 8203314
Per request - refund & PAQ

EE Moderator

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question