Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Uniqueness of index npkey is violated.
Message
General information
Forum:
Visual FoxPro
Category:
CodeMine
Title:
Uniqueness of index npkey is violated.
Miscellaneous
Thread ID:
01123220
Message ID:
01123220
Views:
71
Hi All,

We use CodeMine V7.1.02.

We had a situation where two workstations where adding data to a local view. The data is entered quickly since the users are scanning barcodes to enter the data. Workstation 1 received a "Uniqueness of index npkey is violated." Then workstation 2 also receives the same error. Workstation 2 cleared the error and then continued scanning without a problem. The primary keys are generated using CodeMines PrimaryKey() function.

Looking at the data, workstation 1 started adding adding records with a primary key value of 1, while workstation 2 was adding the correct primary key value. After adding primary keys 1-6 when it got to 7 the uniqueness error occurred, since primary keys 1-6 were not in the table and 7 was. The value for the primary key in appreg01 is correct.
So the data in natural order is as follows:
PK
133201 Workstation 1
133202 Workstation 2
1 Workstation 1
133203 Workstation 2
2 Workstation 1
3 Workstation 1
4 Workstation 1
5 Workstation 1
6 Workstation 1
133204 Workstation 2

So why would the primary key start at 1 again when the value for it is correct in appreg01?

There have been no changes to this process in over 6 months so I do not understand what could have caused this.

Thanks
Tom
Next
Reply
Map
View

Click here to load this message in the networking platform