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 35:     Sub LoadContactDetails(ByVal _UnitID As Integer)
Line 36:         Dim objUnit As New BILS_BO.Unit
Line 37:         objUnit.Retrieve(_UnitID)
Line 38: 
Line 39:         If Not IsNothing(objUnit.ProInspectionDes) AndAlso objUnit.ProInspectionDes <= "" Then

Source File: C:\www\www.bilsdaleproperties.co.uk\minisite\contact.aspx    Line: 37

Stack Trace:


[IndexOutOfRangeException: There is no row at position 0.]
   BILS_BO.Unit.Retrieve(Int32 _UnitID) +6056
   ASP.minisite_contact_aspx.LoadContactDetails(Int32 _UnitID) in C:\www\www.bilsdaleproperties.co.uk\minisite\contact.aspx:37
   ASP.minisite_contact_aspx.Page_Load(Object sender, EventArgs e) in C:\www\www.bilsdaleproperties.co.uk\minisite\contact.aspx:12
   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