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 83: 		Dim strSQL as String = "select suburb from towns where towns.council = '" & strCouncil & "' group by towns.suburb Order by suburb;"
Line 84:         nexus.myCmd.CommandText = strSQL
Line 85:         myReader = nexus.myCmd.ExecuteReader
Line 86:         While myReader.Read()		 
Line 87: 			strSuburbList = strSuburbList & myReader.GetString("suburb") & ", "

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

Stack Trace:


[InvalidOperationException: Connection must be valid and open.]
   MySql.Data.MySqlClient.MySqlCommand.CheckState() +380
   MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior) +166
   ASP.architects_aspx.loadSuburb() in C:\websites\architects.net.au\www\architects.aspx:85
   ASP.architects_aspx.Page_Load(Object sender, EventArgs e) in C:\websites\architects.net.au\www\architects.aspx:44
   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