Server Error in '/' Application.

Cannot find table 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: Cannot find table 0.

Source Error:


Line 59:         DataSet ds = new DataSet();
Line 60:         ds = ob.getProductDetailsNew(productId);
Line 61:         if (ds != null && ds.Tables[0].Rows.Count > 0)
Line 62:         {
Line 63:             if (ds != null && ds.Tables[1].Rows.Count > 0)

Source File: g:\pleskvhosts\logicalera.in\shop.optichouse.in\product-detail.aspx.cs    Line: 61

Stack Trace:


[IndexOutOfRangeException: Cannot find table 0.]
   System.Data.DataTableCollection.get_Item(Int32 index) +113
   product_detail.fillProductDetails(Int32 productId) in g:\pleskvhosts\logicalera.in\shop.optichouse.in\product-detail.aspx.cs:61
   product_detail.Page_Load(Object sender, EventArgs e) in g:\pleskvhosts\logicalera.in\shop.optichouse.in\product-detail.aspx.cs:22
   System.Web.UI.Control.OnLoad(EventArgs e) +108
   System.Web.UI.Control.LoadRecursive() +90
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1533


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