Server Error in '/truenorthsearchdogs' Application.

Object reference not set to an instance of an object.

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.NullReferenceException: Object reference not set to an instance of an object.

Source Error:


Line 179:                qry.Dispose()
Line 180:                qry = New OdbcCommand("Select * from pages where Page = " + Chr(34) + page + Chr(34), p.oconn)
Line 181:                rs = qry.ExecuteReader()
Line 182:            End Try
Line 183:            rs.Read()

Source File: E:\web\sarlaser\truenorthsearchdogs\counter.ascx    Line: 181

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   System.Data.Odbc.OdbcDataReader.GetRowCount() +35
   System.Data.Odbc.OdbcDataReader.FirstResult() +21
   System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior, String method, Boolean needReader, Object[] methodArguments, SQL_API odbcApiMethod) +2321
   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.counter_ascx.Page_Load(Object Source, EventArgs E) in E:\web\sarlaser\truenorthsearchdogs\counter.ascx:181
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +52
   System.Web.UI.Control.OnLoad(EventArgs e) +97
   System.Web.UI.Control.LoadRecursive() +61
   System.Web.UI.Control.LoadRecursive() +134
   System.Web.UI.Control.LoadRecursive() +134
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +693


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