Key violation error

0
August 17, 2011

I am an end user of a program that uses a Paradox v5 database for the entries.  I have had nothing but problems with this, but most I have been able to fix using the table repair utility.  Recently, we started getting a "Key Violation" error when we try to save a new entry.  I attempted to fix the database and rebuild it, but this error continues to appear.  Note that this has never done this until recently (less than a week ago).  How can I repair this so we can use our program again?  We use this program on a day-to-day basis and I would like to get this repaired ASAP!  Thanks!

5

answers

Comments See all(0)

Add comment
0
August 17, 2011

You can use Access 2003 to link to the tables and get a look at the data. You will need to download the latest ISAM drivers from Microsoft as there are published TK's in regards to Paradox and the initial release of Access. Once you have a link established to the tables you can scan through the data an perform queries that can help you locate the record and if you have the BDE engine running on your machine you can make the record go away or even repair it with Access, that is if it can be located. Look very closely at the last record or group of records entered if they can be identified.....

Since you are the end user you may want to consider contacting your IT department (You did not mention If you had one) or if your company has a technical resource that they normally contract with to perform this as you will need to be somewhat comfortable with Access to do this type of mining operation.

0
August 17, 2011

You are trying to reuse a key that is already in the table. Please find out your primary key columns/unique constraint columns that have an existing value for the data that you are trying to insert.

0
August 17, 2011

Hmmmm...I couldn't tell you, since the solution *probably* lies in the program, not damage to the database.  

It is possible that there is some internal record counter within the program that writes its information to a unique key.  For example, something that creates invoices has a record of the last invoice number used.   In the invoice table, there may be a field for the invoice number that needs to be unique (there can only be one invoice record with the number #1015, for example).  If somehow, an invoice with #1016 gets written to the table without the program's internal counter of the last invoice record used getting incremented, the program will try to create another invoice #1016 and get a key violation.

In a nutshell, my thought is that the answer is not going to come from repairing the back-end database, but rather from someone who has experience with your specific application.

0
August 17, 2011

It seems like the problem is boiled down to the database because we were able to add records to previous copies of the same database.  Unfortunately, even if we are able to use a backup, there are about 200+ records that would need to be re-entered.  Can Access update paradox tables with the newest Jet drivers?

0
August 17, 2011

You have to have the BDE engine installed as a prerequisite as well as the updated ISAM drivers but yes.  Either way you sound like you are going to have to restore from the backup. If you can get access to work like microsoft says it will then you will save yourself the leg work of re-entering 200 orders.

Related Questions

Key Violation Error With Append Query

I am getting a key violation error on an Append query and I don't understand why. I am working with a table ('Daily Inventory Receipts') that has only one index (on field 'BatchID' Read More

Views

4

Votes

0

Answers

13

August 17, 2011

problem with primary key violation

i am trying to run clinet progam for BMP application in Ejbs, i am getting a primary key violation error, the follwing is the error java.rmi.RemoteException: EJB Exception:; nested exception is: &#160 Read More

Views

16

Votes

0

Answers

9

August 16, 2011

How to make custom exception message to Violation of Primary key constraing error

I'm trying to add teams names to database and I succeed in it but the problem is that When I give the same name to a team I get: "Violation of PRIMARY KEY constraint 'PK_Joukkueet'. C Read More

Views

5

Votes

0

Answers

13

August 16, 2011

Handle foreign key violation sqlexception 547

Hi. When you delete a record that is being referenced by other tables, you will have a foreign key violation. The following code which is extracted from my project handles the error. I've got the Read More

Views

7

Votes

0

Answers

5

August 16, 2011

What is the best way to import external data into a linking table that has multiple one-to-many relationships?

I understand that there is no way to import text or spreadsheet data to a linking table that has multiple one-to-many relationships (see the diagram of the relationships on the attachment--note the Co Read More

Views

15

Votes

0

Answers

3

August 15, 2011

Violation of Primary Key?

I'm working from an Access Project File.  I have a VIEW saved with about 600 records to be inserted into my main table PS_VENDOR (dbo).  I created a stored procedure to insert the data, Read More

Views

19

Votes

0

Answers

9

August 17, 2011

Error Handling on asp page - primary SQL key

OK, I have a page which stores user information and would like to offer them a chance to update their email address.  The email address is a primary key in SQL, which means no duplicates are allo Read More

Views

20

Votes

0

Answers

4

August 17, 2011

Violation in Access Update Query when removing a space

Although this query does work when I ignore the warning and run the query, is there a way for me to fix this problem. This is the query: UPDATE ActiveGC_Sorted SET ActiveGC_Sorted.Address3 = replace([ Read More

Views

13

Votes

0

Answers

6

August 17, 2011

Violation on FOREIGN KEY constraint

I have almost reached the point of ?Scream!? Running this code will return the error: ?Project Corp.exe raised exception class EIBInterbaseError with message ?violation of FOREIGN KEY constraint ?AVAI Read More

Views

6

Votes

0

Answers

5

August 16, 2011

PHP & Firebird DB primary key problem

Hello, I keep getting this error message when I run my php script: Warning: ibase_query() [function.ibase-query]: violation of PRIMARY or UNIQUE KEY constraint "INTEG_656" on table "SHI Read More

Views

11

Votes

0

Answers

5

August 16, 2011

How to catch SQL Server Error, Stop Insert Query, And Display Friendly Message

I have a .net web app which uses a datagrid and update query. I am attempting to catch the server error generated if an end user attempts to insert data into an existing primary key and redirect the e Read More

Views

8

Votes

0

Answers

13

August 16, 2011

MySQL ERROR

Hi I got a problem with creating database tabels dynamicly. This is my script: <cfset table_list = ""> <cfquery name="get_tables" datasource="my_old_databas e"&g Read More

Views

3

Votes

0

Answers

10

August 15, 2011

error when running append query

Hi I got the following error when running an append query Microsoft Office Access can't append all the records in the append query Microsoft Offcie Access  set 68 field(s) to Null due to a ty Read More

Views

16

Votes

0

Answers

3

August 16, 2011

Finding Duplicates in 2 tables

How do is find duplicates from 2 "different" tables in Access.  I am getting a Key Violation error message while trying to append a table.  The find duplicates Query Wizard only wo Read More

Views

7

Votes

0

Answers

6

August 17, 2011

DataGridView Primary Key error on Save

Hi -   I am a complete beginner when it comes to Visual C# 2008 programming and it seems to me I have a problem with order of updating changes to the database.  Here is my problem: My datagr Read More

Views

4

Votes

0

Answers

2

August 17, 2011

Friendly Error Message

I am using a FormView control and a SqlDataSource to insert registration records into a SQL Server 2008 database. I created a constraint in my database to not insert duplicate registrations. It throws Read More

Views

4

Votes

0

Answers

6

August 17, 2011

Installing SSL on Apache 1.3.27 for Windows 2000 - page not found error

Dear Experts, I am trying to set up my own SSL certificate on Windows 2000 running Apache 1.3.27, PHP 4.3.2, MySQL 3.23, using mod_ssl-2.8.14-1.3.27, openssl-0.9.6j. ActiveState Perl (the latest relea Read More

Views

58

Votes

0

Answers

4

August 17, 2011

Intercepting Violation of Unique Key ?

In my VB.NET program I send data to the SQL Server to Insert a new record. If the data is a duplicate of a Unique key constraints I get back and error and this error is caught with the Try/Catch. But Read More

Views

7

Votes

0

Answers

5

August 15, 2011

DataAdapter.Update Command

Hi All, Thanks for clicking Have converted over from vb6 to vb.net. Am using a GridEx component from Janus systems. Treat it like a DataGrid. Have three of these DataGrids on a form. They are bound to Read More

Views

9

Votes

0

Answers

11

August 17, 2011

Corrupt table/index header

Hi, When I try to open one of my paradox tables with Database Desktop i get the following error: "Corrupt table/index header". Also when I try to add a new record to that table I get "K Read More

Views

15

Votes

0

Answers

7

August 17, 2011