Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Primary Key - Uniqueness Violated
Message
From
02/03/2000 19:21:58
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Primary Key - Uniqueness Violated
Miscellaneous
Thread ID:
00340965
Message ID:
00340965
Views:
58
I'm getting an odd error on a PK in a table.

The PK is an integer field called ID, its index is called PK.

I have about 8 records in the field, all of whose IDs are unique.

The Default value of the ID field (set in the DBC) is a generator function GetNextKey('USERS'), which returns the next key for this table (USERS).

I am doing an INSERT into the table USERS, not passing in ID, so it should be poplated by the DEFAULT value, and getting a uniqueness violated error.

I have confirmed that the value returned by the generator is, in fact, unique to the table, that there are no deleted records with this same ID (even though the PK index has a filter of !DELETED()), and the record actually does get added to the table (with a unique ID that is the value the generator returned).

However... I keep getting the damn error. I'm at my wits' end. Any suggestions on where to look next?

-- jas
Next
Reply
Map
View

Click here to load this message in the networking platform