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 44: 
Line 45:         Dim objUnit As New BILS_BO.Unit
Line 46:         objUnit.Retrieve(_UnitID)
Line 47:         If Not IsNothing(objUnit.ProTour360Id) And Not (objUnit.ProTour360Id = "") Then
Line 48:             a_Tour360.HRef = objUnit.ProTour360Id

Source File: C:\www\www.bilsdaleproperties.co.uk\minisite\gallery.aspx    Line: 46

Stack Trace:


[IndexOutOfRangeException: There is no row at position 0.]
   BILS_BO.Unit.Retrieve(Int32 _UnitID) +6056
   ASP.minisite_gallery_aspx.LoadGallery(Int32 _UnitID) in C:\www\www.bilsdaleproperties.co.uk\minisite\gallery.aspx:46
   ASP.minisite_gallery_aspx.Page_Load(Object sender, EventArgs e) in C:\www\www.bilsdaleproperties.co.uk\minisite\gallery.aspx:11
   System.Web.UI.Control.OnLoad(EventArgs e) +106
   System.Web.UI.Control.LoadRecursive() +68
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3785


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