Unanswered Degugger not returning SQL client errors

  • Tuesday, March 29, 2011 12:59 AM
     
     

    Hi,

     

    I am having trouble with VS 2010 not throwing an exception when an error occurs during a sql server transaction.  As a simple example, If I run the following code to insert a value into a table in SQL server, it runs through the code without error even though the column name is Period not Perioda.  In past set ups it would have complained that Perioda is not a field.  I'm thinking something must have changed in my debugger settings but I can't find anything that would cause that.

                conn.Open();

                string sql ="Insert Into Table4  (Perioda)  SELECT 255";

                SqlCommand sqlComm = new SqlCommand(sql, conn);

                sqlComm.BeginExecuteNonQuery();     //Would normally error here but steps over code as if it executed properly and moves to next line.

                conn.Close();

     

    Thanks in advance for any help.

    Steve

    • Moved by Jon Langdon Tuesday, March 29, 2011 3:01 PM (From:Building Development and Diagnostic Tools for .Net)
    •  

All Replies

  • Friday, September 21, 2012 10:48 AM
     
     

    You need to have the particular exception enabled in Exceptions on the Debug menu.

    Regards,

    Bruce