Server Error in '/' Application.

Connection must be valid and open.

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: Connection must be valid and open.

Source Error:


Line 124:    Function loadRecommended() As Integer
Line 125:        Dim strSQL As String = "SELECT link_name, link_url FROM council_links WHERE council='" & strCouncil & "' ORDER BY priority;"
Line 126:        Nexus.loadRepeater(rptCouncilLinks, strSQL)
Line 127:        Return 1
Line 128:    End Function

Source File: C:\websites\architects.net.au\www\allsuburb.aspx    Line: 126

Stack Trace:


[InvalidOperationException: Connection must be valid and open.]
   MySql.Data.MySqlClient.MySqlCommand.CheckState() +380
   MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior) +166
   MySql.Data.MySqlClient.MySqlCommand.ExecuteDbDataReader(CommandBehavior behavior) +9
   System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) +19
   System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +221
   System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +573
   System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +161
   Nexus.loadRepeater(Object objRepeater, String strSQL) +111
   ASP.allsuburb_aspx.loadRecommended() in C:\websites\architects.net.au\www\allsuburb.aspx:126
   ASP.allsuburb_aspx.Page_Load(Object sender, EventArgs e) in C:\websites\architects.net.au\www\allsuburb.aspx:55
   System.Web.UI.Control.OnLoad(EventArgs e) +132
   System.Web.UI.Control.LoadRecursive() +66
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2428


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