2004-08-12 Sureshkumar T <tsureshkumar@novell.com>
authorSureshkumar T <suresh@mono-cvs.ximian.com>
Thu, 12 Aug 2004 09:17:04 +0000 (09:17 -0000)
committerSureshkumar T <suresh@mono-cvs.ximian.com>
Thu, 12 Aug 2004 09:17:04 +0000 (09:17 -0000)
* SqlDataReader.cs - In Close method, the remaining resultsets are drained
     out, to read output parameters & to avoid stream overlap

svn path=/branches/mono-1-0/mcs/; revision=32257

mcs/class/System.Data/System.Data.SqlClient/ChangeLog
mcs/class/System.Data/System.Data.SqlClient/SqlDataReader.cs

index 14efc7d3b1e6bd399419654229f9f297e50dc298..55a0ce0078217c17c21eaed4921909ddc200d594 100755 (executable)
@@ -1,3 +1,7 @@
+2004-08-12  Sureshkumar T <tsureshkumar@novell.com>
+       * SqlDataReader.cs - In Close method, the remaining resultsets are drained
+                            out, to read output parameters & to avoid stream overlap
+
 2004-06-22  Atsushi Enomoto <atsushi@ximian.com>
 
        * SqlCommandBuilder.cs : Avoid cast exception caused by DbNull.
index 52b6a0a589add7cc066280f836d5f792ec3bdf0c..abe23c3aebfa53b82d5bb39a88cb0e9d2fb6802f 100644 (file)
@@ -131,6 +131,9 @@ namespace System.Data.SqlClient {
 
                public void Close ()
                {
+                       // skip to end & read output parameters
+                       while (NextResult ())
+                               ;
                        isClosed = true;
                        command.Connection.DataReader = null;
                        command.CloseDataReader (moreResults);