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 29:                 Dim table As DataSetProducts.Shop_ProductsDataTable = ds.GetDataByProductID(ID)
Line 30: 
Line 31:                 lblHeader.Text = ReplacePlantName(table.Rows(0).Item("NameDK"))
Line 32:                 lblSize.Text = table.Rows(0).Item("Size")
Line 33:                 Dim DispAntal As Integer = Convert.ToInt32(table.Rows.Item(0).Item("DispAntal"))

Source File: D:\WEB\prima-plant.dk\www\UserControls\UCdetails.ascx.vb    Line: 31

Stack Trace:


[IndexOutOfRangeException: There is no row at position 0.]
   System.Data.RBTree`1.GetNodeByIndex(Int32 userIndex) +119
   System.Data.DataRowCollection.get_Item(Int32 index) +20
   UserControls_UCdetails.Page_Load(Object sender, EventArgs e) in D:\WEB\prima-plant.dk\www\UserControls\UCdetails.ascx.vb:31
   System.Web.UI.Control.OnLoad(EventArgs e) +79
   System.Web.UI.Control.LoadRecursive() +130
   System.Web.UI.Control.LoadRecursive() +200
   System.Web.UI.Control.LoadRecursive() +200
   System.Web.UI.Control.LoadRecursive() +200
   System.Web.UI.Control.LoadRecursive() +200
   System.Web.UI.Control.LoadRecursive() +200
   System.Web.UI.Control.LoadRecursive() +200
   System.Web.UI.Control.LoadRecursive() +200
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2839


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