Server Error in '/truenorthsearchdogs' Application.

ExecuteNonQuery requires an open and available Connection. The connection's current state is connecting.

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: ExecuteNonQuery requires an open and available Connection. The connection's current state is connecting.

Source Error:


Line 212:                qry = New OdbcCommand("", p.oconn)
Line 213:                qry.CommandText = "update pages set Count = " + Chr(34) + CStr(intCount) + Chr(34) + " where Page=" + Chr(34) + page + Chr(34)
Line 214:                qry.ExecuteNonQuery()
Line 215:                qry.Dispose()
Line 216:                p.DisconnectDB()

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

Stack Trace:


[InvalidOperationException: ExecuteNonQuery requires an open and available Connection. The connection's current state is connecting.]
   System.Data.Odbc.OdbcConnection.SetStateExecuting(String method, OdbcTransaction transaction) +1111060
   System.Data.Odbc.OdbcCommand.ValidateConnectionAndTransaction(String method) +41
   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.ExecuteNonQuery() +90
   ASP.counter_ascx.Page_Load(Object Source, EventArgs E) in E:\web\sarlaser\truenorthsearchdogs\counter.ascx:214
   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