none
InsertOnSubmit failing silently? RRS feed

  • Question

  • I've been battling this all day, and I hope someone more experienced out there can help me save my sanity.  I have a web app which is already deployed which makes this harder (for me) to diagnose...

    I'm already doing quite a few inserts of various records at various points on the page with no issues.  But I added a new one, same way as I've done many times... and it just stops running, no indications of a problem but no further execution, and no record added to the table.  I thought I had some problem with the scope of my variables as some are returned from a query so I tried just putting string literals in and same result... it just stops everything dead.  Any ideas? 

    Thursday, March 8, 2012 7:04 PM

Answers

  • Took me all day but I figured it out... wasn't a problem with the insert at all.  There was a key conflict in the table that was creating a duplicate record.  I had been so fixated on the insert failing that it never occurred to me that it was the table design.  Ughhhhhhhhhhhhhhhhhhhhh... ah well, chalk that up to lesson learned.  although I am surprised there was no exception apparent.
    • Marked as answer by PaulBinCT Thursday, March 8, 2012 8:32 PM
    Thursday, March 8, 2012 8:32 PM

All replies

  • Took me all day but I figured it out... wasn't a problem with the insert at all.  There was a key conflict in the table that was creating a duplicate record.  I had been so fixated on the insert failing that it never occurred to me that it was the table design.  Ughhhhhhhhhhhhhhhhhhhhh... ah well, chalk that up to lesson learned.  although I am surprised there was no exception apparent.
    • Marked as answer by PaulBinCT Thursday, March 8, 2012 8:32 PM
    Thursday, March 8, 2012 8:32 PM
  • Hi PaulBinCT,

    Thanks for sharing your experience here.

    Have a nice day.


    Alan Chen[MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, March 15, 2012 8:40 AM
    Moderator