"Error 515 Cannot insert the value NULL into column Vendor_Name" when you run the Check Register and Detailed Remittance Advice report

This article provides a solution to a SQL error 515 that occurs when you run the Check Register and Detailed Remittance Advice report.

Applies to:   Microsoft Dynamics SL 2011, Microsoft Dynamics SL 2015
Original KB number:   3062706

Symptoms

You run the Detailed Remittance Advice (03.625) report and the report doesn't run or you receive this error:

Error: 515, Severity: 16, State: 2

Cannot insert the value NULL into column 'Vendor_Name', table 'SLWinDemoApp60.dbo.AP03625_Wrk'; column does not allow for nulls. INSERT fails.

Note

  • Because of how/what SQL errors are reported to end-users, the end-user might not actually see the error, but in a SQL trace you see the 515 error.
  • You can receive this same error when you run the Check Register (03.630) report.

Resolution

Run these scripts on your application database:

Run this script to fix the error when you print the Check Register (03.630) report.

ALTER TABLE AP03630MC_Wrk ALTER COLUMN Vendor_Name CHAR(30) NULL

Run this script to fix the error when you print the Detailed Remittance Advice (03.625) report.

ALTER TABLE AP03625_Wrk ALTER COLUMN Vendor_Name CHAR(30) NULL