Server Error in '/' Application.

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

Source Error:


Line 103:                if (!(tableName != "") || tableName == null)
Line 104:                {
Line 105:                    dbDataAdapter.Fill(dataSet1);
Line 106:                }
Line 107:                else

Source File: c:\Website\IWCard\readiprint.com\App_Code\clsProcOperations.cs    Line: 105

Stack Trace:


[InvalidOperationException: ExecuteReader requires an open and available Connection. The connection's current state is connecting.]
   System.Data.SqlClient.SqlConnection.GetOpenConnection(String method) +3330660
   System.Data.SqlClient.SqlConnection.ValidateConnectionForExecute(String method, SqlCommand command) +100
   System.Data.SqlClient.SqlCommand.ValidateCommand(String method, Boolean async) +314
   System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) +156
   System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +84
   System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +207
   System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +214
   System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +180
   System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +126
   clsProcOperations.GetDataSet(String commandText, CommandType commandType, Hashtable hstParameters, String tableName) in c:\Website\IWCard\readiprint.com\App_Code\clsProcOperations.cs:105
   clsProcOperations.GetDataset(String commandText, CommandType commandType, Hashtable hstParameters) in c:\Website\IWCard\readiprint.com\App_Code\clsProcOperations.cs:80
   CardAccessoriesDetails.FillCardAccessories(String strCode, String strCardCode) in c:\Website\IWCard\readiprint.com\CardAccessoriesDetails.aspx.cs:67
   CardAccessoriesDetails.Page_Load(Object sender, EventArgs e) in c:\Website\IWCard\readiprint.com\CardAccessoriesDetails.aspx.cs:16
   System.Web.UI.Control.OnLoad(EventArgs e) +108
   System.Web.UI.Control.LoadRecursive() +90
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1533


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4380.0