FbCommand closes the ActiveReader when is disposed. This behavior is diferent
from other DbCommand implemetations
------------------------------------------------------------------------------------------------------------------
Key: DNET-89
URL: http://tracker.firebirdsql.org/browse/DNET-89
Project: .NET Data provider
Issue Type: Bug
Components: ADO.NET Provider
Affects Versions: 2.1.0 Beta 3
Environment: Windows XP
Reporter: Fabiano Rezende
Assignee: Carlos Guzman Alvarez
>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 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
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Firebird-net-provider mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider