Server Error in '/' Application.

Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.

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.Runtime.InteropServices.COMException: Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.

Source Error:


Line 395:		rstCourse = Retrieve_Data(comm)
Line 396:            courseExists = Not rstCourse.EOF
Line 397:            CourseID = rstCourse("CourseID").Value
Line 398:		if courseExists then
Line 399:                'sql = "SELECT * FROM Schedules WHERE ActiveStatus = True AND CourseID = ? AND Date >= ? AND ScheduleID IN (" & ScheduleIDs & ") ORDER BY Date, TimeBegin"

Source File: G:\PleskVhosts\californiasafety.org\httpdocs\Registration.aspx    Line: 397

Stack Trace:


[COMException (0x800a0bcd): Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.]
   Microsoft.VisualBasic.CompilerServices.LateBinding.LateGet(Object o, Type objType, String name, Object[] args, String[] paramnames, Boolean[] CopyBack) +934
   Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateGet(Object Instance, Type Type, String MemberName, Object[] Arguments, String[] ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack) +447938
   ASP.registration_aspx.Load_Course() in G:\PleskVhosts\californiasafety.org\httpdocs\Registration.aspx:397
   ASP.registration_aspx.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in G:\PleskVhosts\californiasafety.org\httpdocs\Registration.aspx:15
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +256
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
   System.Web.UI.Page.Render(HtmlTextWriter writer) +29
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1266


Version Information: Microsoft .NET Framework Version:2.0.50727.9061; ASP.NET Version:2.0.50727.9062