[Mono-dev] Patch for SqlCommand
Neil Cawse
neilcawse at geotab.com
Wed Jun 6 13:51:17 EDT 2007
At the moment SqlCommand is broken in our application from a recent commit.
SqlDataReader is internally constructed with the SqlCommand that created it.
The close method of SqlDataReader relies on the fact that the connection for a command still exists:
command.Connection.DataReader = null
A previous commit sets this to null in the SqlCommand.Dispose
There may be better fixed with some re-architecture - not sure..
Index: /home/neilcawse/mymono/mcs/class/System.Data/System.Data.SqlClient/SqlCommand.cs
===================================================================
--- /home/neilcawse/mymono/mcs/class/System.Data/System.Data.SqlClient/SqlCommand.cs (revision 78769)
+++ /home/neilcawse/mymono/mcs/class/System.Data/System.Data.SqlClient/SqlCommand.cs (working copy)
@@ -582,7 +582,6 @@
if (disposing) {
parameters.Clear();
transaction = null;
- connection = null;
}
disposed = true;
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20070606/e12d56b2/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SqlCommand.patch
Type: application/octet-stream
Size: 649 bytes
Desc: SqlCommand.patch
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20070606/e12d56b2/attachment.obj
More information about the Mono-devel-list
mailing list