SQL Errors such as "column does not belong to table" occur randomly
If an error such as "column "x" does not belong to table "y"" occurs randomly within an ASP.NET site care should be taken to ensure that a single SQLConnection object is not accessed from multiple threads.
There are a couple of scenarios where this might occur:
- SQLConnection declared within a shared class.
- SQLConnection stored in a session or application variable.
Ensuring that a new SQLConnection object is created for every page request when needed is the best way to prevent these errors from happening.