I’m currently getting an error message in my asp.net application as an SQLCommand transaction is being committed, and I can’t see how it is happening. The error message states:
Cannot insert the value NULL into column 'SectorID', table 'EventHistory'; column does not allow nulls.
The error itself makes absolute sense – I shouldn’t be able to add a row with a null SectorID into that table. My problem is that I can’t find anywhere in that section of code that it even tries to insert into that table.
So my question – is it possible to debug this in visual studio to allow me to see all transactions that are away to be committed? I think seeing the offending row might help me pinpoint where this row is being added. I added an item in the watch window for
cmd.Transaction as that looked as likely as anything but I couldn’t find anything in the list of options so I’m not even sure if it’s something that can be viewed when debugging.