Server Error in '/tri-state-k9' Application.

ExecuteReader: Connection property has not been initialized.

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: ExecuteReader: Connection property has not been initialized.

Source Error:


Line 383:                p.ConnectDB()
Line 384:                Dim qS As OdbcCommand = New OdbcCommand("select count(*) from standards where Category=1 group by DiscGroup order by count(*) desc", p.oconn)
Line 385:                Dim rS As OdbcDataReader = qS.ExecuteReader()
Line 386:                rS.Read()
Line 387:                MaxDisciplines = CInt(rS(0))

Source File: E:\web\sarlaser\tri-state-k9\Evaluators.aspx    Line: 385

Stack Trace:


[InvalidOperationException: ExecuteReader: Connection property has not been initialized.]
   System.Data.Odbc.OdbcCommand.ValidateConnectionAndTransaction(String method) +1114386
   System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior, String method, Boolean needReader, Object[] methodArguments, SQL_API odbcApiMethod) +59
   System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior, String method, Boolean needReader) +68
   System.Data.Odbc.OdbcCommand.ExecuteReader(CommandBehavior behavior) +79
   System.Data.Odbc.OdbcCommand.ExecuteReader() +12
   ASP.evaluators_aspx.__RenderBodyContent(HtmlTextWriter __w, Control parameterContainer) in E:\web\sarlaser\tri-state-k9\Evaluators.aspx:385
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +270
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +14
   System.Web.UI.Control.Render(HtmlTextWriter writer) +12
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +67
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +101
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +27
   ASP.site_master.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in E:\web\sarlaser\tri-state-k9\Site.Master:528
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +270
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +14
   System.Web.UI.Control.Render(HtmlTextWriter writer) +12
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +67
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +101
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +27
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +129
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +14
   System.Web.UI.Page.Render(HtmlTextWriter writer) +30
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +67
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +101
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +27
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1342


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