Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


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
  • 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.

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

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

Become an Android App Developer

Ready to kick start your career in 2018? Learn how to build an Android app in January’s Course of the Month and open the door to new opportunities.

Question has a verified solution.

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

Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
How can you see what you are working on when you want to see it while you to save a copy? Add a "Save As" icon to the Quick Access Toolbar, or QAT. That way, when you save a copy of a query, form, report, or other object you are modifying, you…
Suggested Courses

572 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