Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DataReader is already opened
Message
 
 
À
17/08/2010 08:47:41
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01476630
Message ID:
01476786
Vues:
29
>Also, the interesting thing about that situation is that there is no use of a datareader in the flow of logic. In fact, I only use a datareader in a GetSchema() method but that one is not called from the SQLExec() method. Basically, the stack trace gives this:
>
>
>at System.Data.SqlClient.SqlInternalConnectionTds.ValidateConnectionForExecute(SqlCommand command)
>   at System.Data.SqlClient.SqlConnection.ValidateConnectionForExecute(String method, SqlCommand command)
>   at System.Data.SqlClient.SqlCommand.ValidateCommand(String method, Boolean async)
>   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
>   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
>   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
>   at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
>   at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
>   at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
>   at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
>   at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
>   at Framework.Framework.Data.SQLExec(String tcSQL)
>
>
>So, we can see this is in the DbDataAdapter.Fill() method. So, I have no idea why the datareader was mentioned in that error.

In this stack you have several RunExecuteReader and ExecuteReader and ExecuteDbDataReader.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform