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 56:     DataTable dtlist1 = Tools.GetDataSet("select   * from V_C_case where isdel=0 and flowstate=99  and id=" + strid + "  order by orders");
Line 57: 
Line 58:     DataTable classname = Tools.GetDataSet("select * from V_C_caseClass where isdel=0 and flowstate=99 and id='" + dtlist1.Rows[0]["caseClass"] + "'  order by orders ");
Line 59: 
Line 60:     DataTable categoryname = Tools.GetDataSet("select * from V_C_caseCategory where isdel=0 and flowstate=99 and id='" + dtlist1.Rows[0]["caseCategory"] + "'  order by orders ");

Source File: d:\K-康联装饰\wwwroot\caseshow.aspx    Line: 58

Stack Trace:


[IndexOutOfRangeException: There is no row at position 0.]
   System.Data.RBTree`1.GetNodeByIndex(Int32 userIndex) +1678426
   System.Data.DataRowCollection.get_Item(Int32 index) +21
   ASP.caseshow_aspx.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in d:\K-康联装饰\wwwroot\caseshow.aspx:58
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +109
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +8
   System.Web.UI.Page.Render(HtmlTextWriter writer) +29
   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.1031