Incrementing Primary Key

Hi

In my solution i have a purchases table with purchase_id as the primary key. This is auto-incremented by 1 using servoy sequencing.

i have 1 client only who is reporting that this increment is skipping numbers every now and then. They have just recently reported it skip from number 970-980 (10 records) at once. This seems a random pattern and not common however.

No other client has ever reported this and i have never seen this myself, ever. All clients run the same solution and all installations are the same.

Servoy 2.27
MySQL 5.027
JDBC 1.5_06
Windows XP

Would appreciate any clue on why this could be happening.

The database is locked down, no other programs are accessing it (to create records).

Hi Rodney,

Do you use database transactions in that solution?
Gaps can occure when you create a record in a transaction, someone else also creates a record in another transaction. Then when you rollback your transaction and your PK will not be used again.

Hope this helps.

Hi Robert

No transactions are not used. There is basically 1 person doing data entry, there is normally only 1 person in the solution.