LINQ 2 SQL Insert Error(with Guids)
- by Refracted Paladin
I have the below LINQ method that I use to create the empty EmploymentPLan. After that I simply UPDATE. For some reason this works perfectly for myself but for my users they are getting the following error --
The target table 'dbo.tblEmploymentPrevocServices' of the DML statement cannot have any enabled triggers if the statement contains an OUTPUT clause without INTO clause.
This application is a WinForm app that connects to a local SQL 2005 Express database that is a part of a Merge Replication topology. This is an INTERNAL App only installed through ClickOnce.
public static Guid InsertEmptyEmploymentPlan(int planID, string user)
{
using (var context = MatrixDataContext.Create())
{
var empPlan = new tblEmploymentQuestionnaire
{
PlanID = planID,
InsertDate = DateTime.Now,
InsertUser = user,
tblEmploymentJobDevelopmetService = new tblEmploymentJobDevelopmetService(),
tblEmploymentPrevocService = new tblEmploymentPrevocService()
};
context.tblEmploymentQuestionnaires.InsertOnSubmit(empPlan);
context.SubmitChanges();
return empPlan.EmploymentQuestionnaireID;
}
}