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 97:                 res = New Reservation
Line 98:             End If
Line 99:             res.CarGroup = Ad.Tables("models").Rows(0)("cargroup_uid")
Line 100:            res.CarGroup_Code = Ad.Tables("models").Rows(0)("code")
Line 101:            res.CarModel_Uid = Ad.Tables("models").Rows(0)("uid").ToString

Source File: C:\Websites\www.rentacar-milos.gr\fleet.aspx.vb    Line: 99

Stack Trace:


[IndexOutOfRangeException: There is no row at position 0.]
   System.Data.RBTree`1.GetNodeByIndex(Int32 userIndex) +2140448
   System.Data.DataRowCollection.get_Item(Int32 index) +22
   fleet.Page_Init(Object sender, EventArgs e) in C:\Websites\www.rentacar-milos.gr\fleet.aspx.vb:99
   System.Web.UI.Control.OnInit(EventArgs e) +97
   System.Web.UI.Page.OnInit(EventArgs e) +14
   System.Web.UI.Control.InitRecursive(Control namingContainer) +142
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +416


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