2004-03-12 Andreas Nahr <ClassDevelopment@A-SoftTech.com>
[mono.git] / mcs / class / System.Data / System.Data.OleDb / OleDbCommand.cs
index e0c8189e299ae6063da9ceb871924189be09338d..8de3e49794cb44f52eef899a778651a9023631c5 100644 (file)
@@ -234,8 +234,6 @@ namespace System.Data.OleDb
                        if (connection.State == ConnectionState.Closed)
                                throw new InvalidOperationException ("State == Closed");
                        // FIXME: a third check is mentioned in .NET docs
-                       if (connection.DataReader != null)
-                               throw new InvalidOperationException ("DataReader != null");
 
                        IntPtr gdaConnection = connection.GdaConnection;
                        IntPtr gdaParameterList = parameters.GdaParameterList;
@@ -264,8 +262,6 @@ namespace System.Data.OleDb
 
                        if (connection.State != ConnectionState.Open)
                                throw new InvalidOperationException ("State != Open");
-                       if (connection.DataReader != null)
-                               throw new InvalidOperationException ("DataReader != null");
 
                        this.behavior = behavior;
 
@@ -303,9 +299,6 @@ namespace System.Data.OleDb
                
                public object ExecuteScalar ()
                {
-                       if (connection.DataReader != null)
-                               throw new InvalidOperationException ("DataReader != null");
-                       
                        SetupGdaCommand ();
                        OleDbDataReader reader = ExecuteReader ();
                        if (reader == null) {