Server Error in '/' Application.

Object reference not set to an instance of an object.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:


Line 366:                                    <%
Line 367:                                        System.Data.SqlClient.SqlDataReader sdr = Connection.GetTable("*,(SELECT COUNT(*) FROM products WITH(NOLOCK) WHERE pcid = pc.pcid AND sid = 2) AS total", "productcategories pc WITH(NOLOCK)", "pc.sid = 2 AND pc.pcid NOT IN (5,15)", "pc.ordercol ASC");
Line 368:                                        while (sdr.Read())
Line 369:                                        {
Line 370:                                            Response.Write("<li>");

Source File: c:\SITEDATA\AplombSite\Default.aspx    Line: 368

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   ASP.default_aspx.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in c:\SITEDATA\AplombSite\Default.aspx:368
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +116
   System.Web.UI.Page.Render(HtmlTextWriter writer) +38
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +78
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +8752


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.3930.0