Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 869965
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T10:23:32+00:00 2026-05-15T10:23:32+00:00

I have the below LINQ method that I use to create the empty EmploymentPLan

  • 0

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.

The strangest part of this is that you can see the the below Generated SQL that they DO, in fact, contain INTO clauses. WTH???

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;
        }
    }

After further review I noticed that the, previously, accepted solution did not truly apply as Auto-Sync was ALREADY set to never for all ID Columns.

Anyone have any other ideas? Thanks


He is the generated SQL. I know it is long but I am just at a loss. This is ALL generated by the single above Method.

DECLARE @output TABLE([EmploymentPrevocID] UniqueIdentifier)
INSERT INTO [dbo].[tblEmploymentPrevocServices]([AvgRatePay], [AvgHoursWeek], [SettingID], [PrevocGoal], [SkillsTaught], [SkillsLearned], [AnticipatedTransitionPlans], [AnticipatedEndDate], [RatioID])
OUTPUT INSERTED.[EmploymentPrevocID] INTO @output
VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7, @p8)
SELECT [EmploymentPrevocID] FROM @output
-- @p0: Input VarChar (Size = 0; Prec = 0; Scale = 0) [Null]
-- @p1: Input VarChar (Size = 0; Prec = 0; Scale = 0) [Null]
-- @p2: Input Int (Size = 0; Prec = 0; Scale = 0) [Null]
-- @p3: Input VarChar (Size = 0; Prec = 0; Scale = 0) [Null]
-- @p4: Input VarChar (Size = 0; Prec = 0; Scale = 0) [Null]
-- @p5: Input VarChar (Size = 0; Prec = 0; Scale = 0) [Null]
-- @p6: Input VarChar (Size = 0; Prec = 0; Scale = 0) [Null]
-- @p7: Input DateTime (Size = 0; Prec = 0; Scale = 0) [Null]
-- @p8: Input Int (Size = 0; Prec = 0; Scale = 0) [Null]
-- Context: SqlProvider(Sql2005) Model: AttributedMetaModel Build: 3.5.30729.4926

DECLARE @output TABLE([JobDevelopmentServicesID] UniqueIdentifier)
INSERT INTO [dbo].[tblEmploymentJobDevelopmetServices]([TypeWorkDesired], [PreferredWorkHoursID], [NeedEmploymentServices], [DVRProvidingServices], [DVRCurrentReferral], [PaidCoachingHoursID], [PlanSegregatedToIntegrated], [RoleResponseJobDeveloper], [RoleResponseMember], [RoleResponseWWCTeam], [PlanDVRToWWCFund], [PlanReducePaidSupports])
OUTPUT INSERTED.[JobDevelopmentServicesID] INTO @output
VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7, @p8, @p9, @p10, @p11)
SELECT [JobDevelopmentServicesID] FROM @output
-- @p0: Input VarChar (Size = 0; Prec = 0; Scale = 0) [Null]
-- @p1: Input Int (Size = 0; Prec = 0; Scale = 0) [Null]
-- @p2: Input Bit (Size = 0; Prec = 0; Scale = 0) [Null]
-- @p3: Input Bit (Size = 0; Prec = 0; Scale = 0) [Null]
-- @p4: Input Bit (Size = 0; Prec = 0; Scale = 0) [Null]
-- @p5: Input Int (Size = 0; Prec = 0; Scale = 0) [Null]
-- @p6: Input VarChar (Size = 0; Prec = 0; Scale = 0) [Null]
-- @p7: Input VarChar (Size = 0; Prec = 0; Scale = 0) [Null]
-- @p8: Input VarChar (Size = 0; Prec = 0; Scale = 0) [Null]
-- @p9: Input VarChar (Size = 0; Prec = 0; Scale = 0) [Null]
-- @p10: Input VarChar (Size = 0; Prec = 0; Scale = 0) [Null]
-- @p11: Input VarChar (Size = 0; Prec = 0; Scale = 0) [Null]
-- Context: SqlProvider(Sql2005) Model: AttributedMetaModel Build: 3.5.30729.4926

DECLARE @output TABLE([EmploymentQuestionnaireID] UniqueIdentifier)
INSERT INTO [dbo].[tblEmploymentQuestionnaire]([PlanID], [CommunityJob], [PrevocServices], [JobDevelopmentServices], [PrevocServicesID], [JobDevelopmentServicesID], [InsertUser], [InsertDate], [UpdateUser], [UpdateDate], [TransitionedPrevocToIntegrated], [EmploymentServiceMatchPref])
OUTPUT INSERTED.[EmploymentQuestionnaireID] INTO @output
VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7, @p8, @p9, @p10, @p11)
SELECT [EmploymentQuestionnaireID] FROM @output
-- @p0: Input Int (Size = 0; Prec = 0; Scale = 0) [37017]
-- @p1: Input Bit (Size = 0; Prec = 0; Scale = 0) [False]
-- @p2: Input Bit (Size = 0; Prec = 0; Scale = 0) [False]
-- @p3: Input Bit (Size = 0; Prec = 0; Scale = 0) [False]
-- @p4: Input UniqueIdentifier (Size = 0; Prec = 0; Scale = 0) [a3674e69-9b78-df11-b74e-001e0bd023bc]
-- @p5: Input UniqueIdentifier (Size = 0; Prec = 0; Scale = 0) [a4674e69-9b78-df11-b74e-001e0bd023bc]
-- @p6: Input VarChar (Size = 9; Prec = 0; Scale = 0) [pschaller]
-- @p7: Input DateTime (Size = 0; Prec = 0; Scale = 0) [6/15/2010 11:31:13 AM]
-- @p8: Input VarChar (Size = 0; Prec = 0; Scale = 0) [Null]
-- @p9: Input DateTime (Size = 0; Prec = 0; Scale = 0) [Null]
-- @p10: Input Bit (Size = 0; Prec = 0; Scale = 0) [Null]
-- @p11: Input Bit (Size = 0; Prec = 0; Scale = 0) [Null]
-- Context: SqlProvider(Sql2005) Model: AttributedMetaModel Build: 3.5.30729.4926
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T10:23:32+00:00Added an answer on May 15, 2026 at 10:23 am

    Does this apply to you?

    http://support.microsoft.com/kb/961073

    FIX: Error message when you run a DML
    statement in a LINQ to SQL application
    in SQL Server 2008: “The target table
    ” of the DML statement
    cannot have any enabled triggers if
    the statement contains an OUTPUT
    clause without INTO clause”

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the below LINQ to SQL method that takes an inordinate amount of
Using LINQ to Entities with Entity Framework and C#: I have a method that
I am trying to learn more about regular expressions I have one below that
I have a very complex Linq to SQL query that returns a result set
I am trying to create an extension method that i can forward a IList
I have created small test web application which makes use of LINQ to SQL.
I have a script that appends some rows to a table. One of the
I have a LINQ expression that gets used as a filer in a LINQ
I have the below LINQ statement, and get the error 'int' does not contain
I have noticed lately that the Visual Studio 2010 debugger keeps jumping into this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.