Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FbCommand closes the ActiveReader when is disposed. This behavior is diferent from other DbCommand implemetations [DNET89] #102

Closed
firebird-automations opened this issue May 18, 2007 · 4 comments

Comments

@firebird-automations
Copy link

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(); <<<======

			\.
			\.
			\.

			this\.disposed = true;
		\}
		finally
		\{
			base\.Dispose\(disposing\);
		\}
	\}
\}

}

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
}

@firebird-automations
Copy link
Author

Commented by: @carlosga

It's working as designed and this will be no changed for now.

@firebird-automations
Copy link
Author

Modified by: @carlosga

status: Open [ 1 ] => Closed [ 6 ]

resolution: Fixed [ 1 ]

@firebird-automations
Copy link
Author

Modified by: @carlosga

status: Closed [ 6 ] => Reopened [ 4 ]

resolution: Fixed [ 1 ] =>

@firebird-automations
Copy link
Author

Modified by: @carlosga

status: Reopened [ 4 ] => Closed [ 6 ]

resolution: Won't Fix [ 2 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant