SOLVED: Negative Unique Record ID error in EDL
How to fix "Negative unique record ID" error in EDL
Print Friendly View
written: 12/08/2011
last modified: 04/05/2024


When uploading records from a QCC file to SQL Server via the Enterprise Data Loader (EDL), you may receive this error message:

"A negative Unique Record ID was calculated which should not happen."

At this point the transaction for the QCC file is rolled back and the QCC file is not uploaded into your SQL Server database.


This was the result of our efforts to keep track of records that have disappeared due to compacting, purging, or circular databases. Please follow the resolution below to solve this issue. 1/1/2016 - UPDATE for QC-CALC 3.4: If you have a circular QCC file and the file has filled and circled back, then you will receive this error in EDL. This is because the records EDL is trying to load are no longer in existence. For instance, if you tell QC-CALC to circle back after a capacity of 100 records and you have collected 150 records, then the original 50 records have been overwritten and are no longer available. This is why EDL throws up the error. See resolution below. RESOLUTION for QC-CALC 3.3

The solution to this issue is to re-compact the QCC file with the latest revision of QC-CALC 3.3. Make sure your copy of EDL is also at the latest revision.


  1. Launch QC-CALC SPC 3.3 and choose Help > Run Update.
  2. Once you are on the correct revision, open the QCC file in question using File > Open from within QC-CALC SPC.
  3. Choose Tools > Compact Database. When it asks if you are sure, reply Yes.
  4. Re-run your event in EDL.

When it compacts the QCC file, it will renumber the records correctly which should allow the QCC file to be uploaded to SQL Server.


If the circular situation occurs and you receive this error from EDL, follow the steps below to resolve it:

1. In QC-CALC Real-Time 3.4, open the QCC file (File > Open).
2. Go to File > Compact Database.
3. Answer Yes to the "Are you sure you want to delete the marked records?" question.

At this point any deleted records (NOT points) will be removed from the file and the file will be reordered so the oldest existing record is at record one and the newest is the highest record number. Your file will still be circular at this point.

4. To make the file non-Circular, select File > Modify Database Structure.

5. Select the Database Properties tab.

6. Set the Database Fill Mode to Non-Circular.

7. Click OK. QC-CALC will rebuild your QCC file at this point.

8. Run your EDL event after the rebuild is complete and it should upload without error.

If you would like to keep your QCC file circular, you can do so by skipping steps 4-7 above. Just make sure you are running the EDL events often enough that EDL does not try to get records that no longer exist.

Applies To

Enterprise Data Loader v.4.20
Enterprise Data Loader v.4.00
QC-CALC Real-Time v.3.40
QC-CALC SPC v.3.40


Importing Data
See more articles in this category