You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
protected override void Dispose(bool disposing)
{
lock (this)
{
if (!this.disposed)
{
try
{
// If there are an active reader close it
this.CloseReader(); <<<======
IMHO all http://ADO.NET provider must have the same behavior.
For example:
The Microsoft.Practices.EnterpriseLibrary.Data.Database has the following method that returns a DataReader
public IDataReader ExecuteReader(string storedProcedureName, params object[] parameterValues)
{
using (DbCommand command = GetStoredProcCommand(storedProcedureName, parameterValues))
{
return ExecuteReader(command);
} // << command is disposed here and the returned DataReader will be closed
}
The text was updated successfully, but these errors were encountered:
Submitted by: Fabiano Rezende (fabiano.rezende)
Assigned to: @carlosga
From FbCommand.cs:
protected override void Dispose(bool disposing)
{
lock (this)
{
if (!this.disposed)
{
try
{
// If there are an active reader close it
this.CloseReader(); <<<======
}
IMHO all http://ADO.NET provider must have the same behavior.
For example:
The Microsoft.Practices.EnterpriseLibrary.Data.Database has the following method that returns a DataReader
public IDataReader ExecuteReader(string storedProcedureName, params object[] parameterValues)
{
using (DbCommand command = GetStoredProcCommand(storedProcedureName, parameterValues))
{
return ExecuteReader(command);
} // << command is disposed here and the returned DataReader will be closed
}
The text was updated successfully, but these errors were encountered: