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 92: 	Function loadCouncilLinks()
Line 93: 		Dim strSQL as String = "select Council from towns Group by Council;"
Line 94: 		nexus.loadRepeater(rptCouncils, strSQL)
Line 95: 	End function
Line 96: 	

Source File: C:\websites\veterinaryhospitals.net.au\www\veterinarians.aspx    Line: 94

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.veterinarians_aspx.loadCouncilLinks() in C:\websites\veterinaryhospitals.net.au\www\veterinarians.aspx:94
   ASP.veterinarians_aspx.Page_Load(Object sender, EventArgs e) in C:\websites\veterinaryhospitals.net.au\www\veterinarians.aspx:40
   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