Board index » delphi » Key violation message appearing for non-key violations!

Key violation message appearing for non-key violations!

I have the situation where a user is getting the Key Violation message box.
However, after manually checking the Paradox tables, I can't see how this
could possibly be (table are OK).

To add to the mystery I back loaded their .exe and tables on my PC and tried
to re-create the problem.  I couldn't!

Could this be related to the fact that we have different PC setups?  That
is:
- Hardware related?
- Operating system related? (my PC is Windows ME, the problem PC is Windows
95)
- Delphi version related? (using v3)
- Printer driver related? (now I'm really getting desperate!)

Any help would be appreciated.

Joe.

 

Re:Key violation message appearing for non-key violations!


Quote
>Joe La Vista wrote:

>I have the situation where a user is getting the Key Violation message

A key violation occurs when attempting to post a duplicate value to a
field that has a unique index.
________
Andreas
Delphi 5.01 Pro, NT4 Sp6a
Direct replies mailto:paw...@gmx.net

Re:Key violation message appearing for non-key violations!


  Just to follow-up on Andreas' response...when you get the key violation
error, the data that was being added when the error occurred is *not* added.
Thus, examining the data after the error will not show any duplicates.  You
need to know what the values of the record were that filed to post, and see
if those are already in your table.
-Howard

Re:Key violation message appearing for non-key violations!


A key violation exception can be caused by trying to post a duplicate value
to any unique index, not just the primary key.

--
Bill

Re:Key violation message appearing for non-key violations!


Quote
>I have the situation where a user is getting the Key Violation message box.
>However, after manually checking the Paradox tables, I can't see how this
>could possibly be (table are OK).

A corrupt table can cause Keyviolation problems. If it appears that there are no
duplicate values in unique indexed fields try rebuilding the table with
Tutility.

--
Brian Bushay (TeamB)
Bbus...@NMPLS.com

Other Threads