INSERT Error when attempting to add a record to DT_LITHOLOGY

<< Click to Display Table of Contents >>

Navigation:  Professional > Troubleshooting >

INSERT Error when attempting to add a record to DT_LITHOLOGY

Affected Software Version: Databases that had auditing on DT_LITHOLOGY from a pre-7.0.0.19144 build that were then upgraded to build 7.0.0.19144 or 7.0.0.19214.

 

Symptoms: If you had auditing enabled on DT_LITHOLOGY prior to updating your database to build 7.0.0.19144, and attempt to add records to DT_LITHOLOGY, you will receive the following error even when END_DEPTH is populated:

 

Failed to commit changes since one or more of the record(s) could not be saved. Could not insert into dt_lithology row #|#||... because the INSERT statement conflicted with the CHECK constraint 'CK__dt_lithology__end_depth__required' The conflict occurred in database "[DatabaseName]", table "dbo.dt_lithology". The statement has been terminated.

 

 

Cause/Details: The trigger [trg_dt_lithology_instead_of_insert] that is added when auditing is turned on for DT_LITHOLOGY is not properly re-created during the update process.

 

Resolution/Workaround: The database administrator should run the following in SQL Server Management Studio.

 

EXEC equis.refresh_schema 'dbo', 'dt_lithology';

 

For EarthSoft hosted clients, this can be done by EarthSoft IT. Please contact support@earthsoft.com if you are experiencing this error.