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 115:
Line 116:    Function loadNames() As Integer
Line 117:        Dim dtResults As DataTable = Nexus.loadTable("Select architect_id, name, DATE_FORMAT(Rego_Date, '%Y') AS Rego_Date, Cert_No From architects Where company_id = '" & Request.QueryString("id") & "' AND Cert_No >= 1 order by name;")
Line 118:        Dim drRow As DataRow
Line 119:

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

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.loadTable(String strSQL) +105
   ASP.architect_aspx.loadNames() in C:\websites\architects.net.au\www\architect.aspx:117
   ASP.architect_aspx.Page_Load(Object Sender, EventArgs E) in C:\websites\architects.net.au\www\architect.aspx:56
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +25
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +42
   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