This is the code:
_EntityProgram.Add();
_EntityProgram.MRN = _Entity.MRN;
_EntityProgram.EnrolledProgram = comboPrograms.Text;
_EntityProgram.Save();
_EntityProgram is an instance of a BO
This is the DDL for the table behind the BO:
CREATE TABLE [dbo].[EntityProgram] (
[MRN] [varchar] (36) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
[EnrolledProgram] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[EntityProgram] WITH NOCHECK ADD
CONSTRAINT [PK_EntityProgram] PRIMARY KEY CLUSTERED
(
[MRN],
[EnrolledProgram]
 
ON [PRIMARY]
GO
It's complaining about converting varchar to numeric but both fields are varchar and both are part of the PK.
This is the Error:
Cannot insert the value NULL into column 'EnrolledProgram', table 'CRM.dbo.EntityProgram'; column does not allow nulls. INSERT fails.
Error converting data type varchar to numeric.