Statement not always inserting. RRS feed

  • Question

  • Hello

    I am having a quite simple statement that I am inserting into a database.

    The code succeds when I run it locally on our test servers but not when I try to deploy it to a production server.

    However all other linq statements is running fine and no exception is thrown.

    I know the code is set to be executed since the log has the message written in it

    All the foreign key references is okay and the table is a clustered key on FinancialPointID and UserID.

    I am totally at loss here on where I should even start to look for the problem so any guidance is most welcome. 

    The code in question is: 


     foreach(var toBeInserted in current.ListOfUserIDasString)


                  Log.Write("Adding " + toBeInserted + " as secondary approver"); //This is run

                   var secondaryFA = new FinancialApprover


                                                      FinancialPointID = OtherLinqObject.ID,

                                                      IsPrimaryApprover = false,

                                                      CreatedBySync = true,

                                                      UserID = toBeInserted






    Monday, September 12, 2011 7:45 AM


All replies