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 22:   {
Line 23:       nowinfo = BBYCMS.Include.Common.GetTableInfoByWhere("bby_table_product","[id]=" + one.Split('-')[1]);
Line 24:       preinfo = BBYCMS.Include.Common.GetTableInfoWhat("bby_table_product where [show]=1 and [type]=" + nowinfo.Tables[0].Rows[0]["type"] + " and id<" + one.Split('-')[1] + " order by id desc","top 1 *");
Line 25:       nextinfo = BBYCMS.Include.Common.GetTableInfoWhat("bby_table_product where [show]=1 and [type]=" + nowinfo.Tables[0].Rows[0]["type"] + " and id>" + one.Split('-')[1], "top 1 *");
Line 26:       parentids = BBYCMS.Include.Common.GetTableParentIds("bby_table_producttype", nowinfo.Tables[0].Rows[0]["type"].ToString());

Source File: d:\web\webservers\kenda\Views\Home\Product.aspx    Line: 24

Stack Trace:


[IndexOutOfRangeException: There is no row at position 0.]
   System.Data.RBTree`1.GetNodeByIndex(Int32 userIndex) +1649146
   System.Data.DataRowCollection.get_Item(Int32 index) +21
   ASP.views_home_product_aspx.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in d:\web\webservers\kenda\Views\Home\Product.aspx:24
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +109
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +8
   System.Web.Mvc.ViewPage.Render(HtmlTextWriter writer) +55
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3060


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