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 434:                    sa.Fill(ds)
Line 435:                    Dim Pds1 As New PagedDataSource()
Line 436:                    Pds1.DataSource = ds.Tables(0).DefaultView
Line 437:                    Dim TotalCount As Integer = Pds1.Count
Line 438:                    Pds1.AllowPaging = True

Source File: C:\web\I_Dbv_Content\products.aspx    Line: 436

Stack Trace:


[IndexOutOfRangeException: Cannot find table 0.]
   System.Data.DataTableCollection.get_Item(Int32 index) +81
   ASP.products_aspx.rptMain_Fill(Repeater rpt, Int32 WebsiteKey, Int32 CategoryKey, Int32 ItemKey, String SearchText, String OrderBy) in C:\web\I_Dbv_Content\products.aspx:436
   ASP.products_aspx.Page_Load(Object sender, EventArgs e) in C:\web\I_Dbv_Content\products.aspx:194
   System.Web.UI.Control.OnLoad(EventArgs e) +97
   System.Web.UI.Control.LoadRecursive() +61
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +693


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