Server Error in '/' Application.

Invalid attempt to call HasRows when reader is closed.

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.InvalidOperationException: Invalid attempt to call HasRows when reader is closed.

Source Error:


Line 480:        Dim curProperty As String = ""
Line 481:
Line 482:        If result.HasRows Then
Line 483:            resultsCounter = 1
Line 484:

Source File: E:\AADATA\WEB\NT\peopleDetails.aspx.vb    Line: 482

Stack Trace:


[InvalidOperationException: Invalid attempt to call HasRows when reader is closed.]
   System.Data.SqlClient.SqlDataReader.get_HasRows() +1623456
   peopleDetails.getPersonRoles1(Int32 personID) in E:\AADATA\WEB\NT\peopleDetails.aspx.vb:482
   ASP.peopledetails_aspx.__Renderform1(HtmlTextWriter __w, Control parameterContainer) in E:\AADATA\WEB\NT\peopleDetails.aspx:74
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +115
   System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +253
   System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) +87
   System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) +53
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +240
   System.Web.UI.Page.Render(HtmlTextWriter writer) +38
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4240


Version Information: Microsoft .NET Framework Version:2.0.50727.8974; ASP.NET Version:2.0.50727.8975