Server Error in '/' Application.

There is no row at position 0.

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.IndexOutOfRangeException: There is no row at position 0.

Source Error:


Line 9:  </script>
Line 10: <%="" %>
Line 11:             <%Dim cat3T As DataRow = dbh.GetData("select cat1pagename,cat2pagename,cat3id1,cat3tittle" & dbh.l & ",cat3description" & dbh.l & ",cat3firstdate,cat3pagename from cat1,cat2,cat3 where cat2_id1=cat2id1 and cat1_id1=cat1id1 and cat3id1=" & pid).Rows(0)%>
Line 12:             <%Dim productsT As DataTable = dbh.GetData("select productstittle" & dbh.l & ",productspagename from products where productscanbeseen='True' and cat3_id1=" & cat3T("cat3id1") & " order by productssort1")%>
Line 13:             <div class="ps-product">

Source File: C:\Inetpub\vhosts\profelmnet.com\httpdocs\ProductBox.ascx    Line: 11

Stack Trace:


[IndexOutOfRangeException: There is no row at position 0.]
   System.Data.RBTree`1.GetNodeByIndex(Int32 userIndex) +2441565
   System.Data.DataRowCollection.get_Item(Int32 index) +19
   ASP.productbox_ascx.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in C:\Inetpub\vhosts\profelmnet.com\httpdocs\ProductBox.ascx:11
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +117
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +79
   ASP.product_aspx.__RenderContent3(HtmlTextWriter __w, Control parameterContainer) in C:\Inetpub\vhosts\profelmnet.com\httpdocs\product.aspx:266
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +117
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +79
   ASP.site_master.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in C:\Inetpub\vhosts\profelmnet.com\httpdocs\site.master:151
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +117
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +79
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +250
   System.Web.UI.Page.Render(HtmlTextWriter writer) +39
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +79
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +8753


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