Solved

Key violation error

Posted on 2004-04-21
5
1,722 Views
Last Modified: 2012-08-14
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!
0
Comment
Question by:kvalley9599
[X]
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
5 Comments
 
LVL 1

Expert Comment

by:cm_ram23
ID: 10883685
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
 
LVL 4

Expert Comment

by:boxcar7
ID: 10883745
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
 
LVL 2

Accepted Solution

by:
allinb earned 500 total points
ID: 10895974
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
 

Author Comment

by:kvalley9599
ID: 10902354
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
 
LVL 2

Expert Comment

by:allinb
ID: 10902434
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.
0

Featured Post

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

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

Suggested Solutions

This article shows the steps required to install WordPress on Azure. Web Apps, Mobile Apps, API Apps, or Functions, in Azure all these run in an App Service plan. WordPress is no exception and requires an App Service Plan and Database to install
Recently, Microsoft released a best-practice guide for securing Active Directory. It's a whopping 300+ pages long. Those of us tasked with securing our company’s databases and systems would, ideally, have time to devote to learning the ins and outs…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

734 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