Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SqlException / Patch 5
#8
Je mehr ich mir das Log anschaue, desto mehr bin ich der Überzeugung, dass unsauber programmiert wurde:

Code:
An error occured on executing an sql statement
PropertiesGet
There is already an open DataReader associated with this Command which must be closed first.

---------------------------

   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, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   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.ExecuteReader()
   at CloudAdminDataAccess.SqlDataAccessor._PropertiesGet(Guid userId, Guid itemId, Guid rolePropertyId)


Diese Melde besagt, dass eine Instanz der SqlCommand Klasse nicht sauber mittels Dispose aufgeräumt wurde und noch mit der SQL Verbindung verknüpft ist.
Diese wurde scheinbar auch nicht released (Dispose) und wurde wiederverwendet.

Ich will mich hier nicht aufspielen, aber normalerweise lernt man, dass man bei .NET/Java etc. try-finally Blöcke genau dafür verwenden soll!

Markus
Reply


Messages In This Thread
SqlException / Patch 5 - by adestis - 24-10-2019, 10:45 AM
RE: SqlException / Patch 5 - by DevOma - 24-10-2019, 10:51 AM
RE: SqlException / Patch 5 - by adestis - 25-11-2019, 11:39 AM
RE: SqlException / Patch 5 - by DevOma - 25-11-2019, 11:54 AM
RE: SqlException / Patch 5 - by adestis - 25-11-2019, 12:02 PM
RE: SqlException / Patch 5 - by adestis - 20-12-2019, 09:37 AM
RE: SqlException / Patch 5 - by adestis - 20-12-2019, 09:41 AM
RE: SqlException / Patch 5 - by adestis - 20-12-2019, 09:46 AM
RE: SqlException / Patch 5 - by DevOma - 27-12-2019, 02:38 PM
RE: SqlException / Patch 5 - by adestis - 02-01-2020, 11:39 AM
RE: SqlException / Patch 5 - by DevOma - 02-01-2020, 11:53 AM
RE: SqlException / Patch 5 - by adestis - 03-01-2020, 03:33 PM
RE: SqlException / Patch 5 - by DevOma - 07-01-2020, 10:12 AM
RE: SqlException / Patch 5 - by DevOma - 13-01-2020, 04:56 PM



Users browsing this thread: 1 Guest(s)