---
title: "QC Samples - Cannot insert the value NULL into Column Hole_ID"
canonical: "https://servicedesk.maxgeo.com/space/DS/1467416577/QC%20Samples%20-%20Cannot%20insert%20the%20value%20NULL%20into%20Column%20Hole_ID"
format: markdown
---
**QC Samples – Cannot insert NULL into Hole_ID**

DataShed5

When adding new QC samples to the various QC Sample tables, the Original SampleID of which the QC sample is a duplicate, is checked before the record is committed.

This happens if you **import data or create the QC sample in the View Data grid** of DataShed5

When the Original SampleID is missing altogether or is wrong and cannot be found in the main Samples table, then an error message is received directly from SQL Server, not DataShed5: 

**“Cannot insert the value NULL into column ‘Hole_ID’, table ‘DatabaseName.dbo.tblDHSampQC’; column does not allow nulls. UPDATE fails.”**

The error message is generic and misleading.

It’s not that the **Hole_ID** is missing or incorrect but rather that the OrigSampleID value is incorrect or missing and can’t be associated with any Hole_ID and when the whole row of data is inserted into the table without the Hole_ID, the entire Foreign Key reference of the table is violated resulting in the strange exception message.

![image](media://dc0ce3de-5566-4e45-a328-33aa29e5cfe1)