Relax. ASP.NET Web Hosting without the hassles. Ring 1300 787 698
(
Skip Navigation Links : Knowledge Base : ASP.NET : SQL Errors such as "column does not belong to table" occur randomly

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:

  1. SQLConnection declared within a shared class.
  2. 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.



 

 

)