Author: anagappan
Date: 2007-10-19 01:32:09 -0400 (Fri, 19 Oct 2007)
New Revision: 87811
Modified:
trunk/mcs/class/System.Data/System.Data.OleDb/ChangeLog
trunk/mcs/class/System.Data/System.Data.OleDb/OleDbCommand.cs
trunk/mcs/class/System.Data/System.Data.OleDb/OleDbParameterCollection.cs
Log:
* OleDbCommand.cs: Implemented Clone, Dispose methods.
Implemented CreateDbParameter, DbConnection, DbParameterCollection,
DbTransaction, ExecuteDbDataReader properties.
* OleDbParameterCollection.cs: Fixed 1.0 API compatibility.
Modified: trunk/mcs/class/System.Data/System.Data.OleDb/ChangeLog
===================================================================
--- trunk/mcs/class/System.Data/System.Data.OleDb/ChangeLog 2007-10-19
05:24:09 UTC (rev 87810)
+++ trunk/mcs/class/System.Data/System.Data.OleDb/ChangeLog 2007-10-19
05:32:09 UTC (rev 87811)
@@ -1,3 +1,11 @@
+2007-10-19 Nagappan <[EMAIL PROTECTED]>
+
+ * OleDbCommand.cs: Implemented Clone, Dispose methods.
+ Implemented CreateDbParameter, DbConnection, DbParameterCollection,
+ DbTransaction, ExecuteDbDataReader properties.
+
+ * OleDbParameterCollection.cs: Fixed 1.0 API compatibility.
+
2007-09-27 Nagappan A <[EMAIL PROTECTED]>
* OleDbDataReader.cs: Removed bogus MonoTODO.
Modified: trunk/mcs/class/System.Data/System.Data.OleDb/OleDbCommand.cs
===================================================================
--- trunk/mcs/class/System.Data/System.Data.OleDb/OleDbCommand.cs
2007-10-19 05:24:09 UTC (rev 87810)
+++ trunk/mcs/class/System.Data/System.Data.OleDb/OleDbCommand.cs
2007-10-19 05:32:09 UTC (rev 87811)
@@ -69,6 +69,8 @@
CommandBehavior behavior;
IntPtr gdaCommand;
+ bool disposed = false;
+
#endregion // Fields
#region Constructors
@@ -196,18 +198,17 @@
}
[DataCategory ("Data")]
-#if !NET_2_0
+#if ONLY_1_1
[DataSysDescriptionAttribute ("The parameters collection.")]
#endif
[DesignerSerializationVisibilityAttribute
(DesignerSerializationVisibility.Content)]
public new OleDbParameterCollection Parameters {
- get {
- return parameters;
- }
+ get { return parameters; }
+ internal set { parameters = value; }
}
[BrowsableAttribute (false)]
-#if !NET_2_0
+#if ONLY_1_1
[DataSysDescriptionAttribute ("The transaction used by the
command.")]
#endif
[DesignerSerializationVisibilityAttribute
(DesignerSerializationVisibility.Hidden)]
@@ -225,16 +226,15 @@
#if !NET_2_0
[DataSysDescriptionAttribute ("When used by a
DataAdapter.Update, how command results are applied to the current DataRow.")]
#endif
+ [MonoTODO]
public
#if NET_2_0
override
#endif
UpdateRowSource UpdatedRowSource {
- [MonoTODO]
get {
throw new NotImplementedException ();
}
- [MonoTODO]
set {
throw new NotImplementedException ();
}
@@ -290,10 +290,14 @@
}
#endif
- [MonoTODO]
protected override void Dispose (bool disposing)
{
- throw new NotImplementedException ();
+ if (disposed)
+ return;
+
+ Connection = null;
+ Transaction = null;
+ disposed = true;
}
private void SetupGdaCommand ()
@@ -418,17 +422,26 @@
}
#if NET_2_0
- [MonoTODO]
- public OleDbCommand Clone ()
+ public
+#else
+ internal
+#endif
+ OleDbCommand Clone ()
{
- throw new NotImplementedException ();
+ OleDbCommand command = new OleDbCommand ();
+ command.CommandText = this.CommandText;
+ command.CommandTimeout = this.CommandTimeout;
+ command.CommandType = this.CommandType;
+ command.Connection = this.Connection;
+ command.DesignTimeVisible = this.DesignTimeVisible;
+ command.Parameters = this.Parameters;
+ command.Transaction = this.Transaction;
+ return command;
}
-#endif
- [MonoTODO]
object ICloneable.Clone ()
{
- throw new NotImplementedException ();
+ return Clone ();
}
[MonoTODO]
@@ -447,33 +460,28 @@
}
#if NET_2_0
- [MonoTODO]
protected override DbParameter CreateDbParameter ()
{
- throw new NotImplementedException ();
+ return (DbParameter) CreateParameter ();
}
- [MonoTODO]
protected override DbDataReader ExecuteDbDataReader
(CommandBehavior behavior)
{
- throw new NotImplementedException ();
+ return (DbDataReader) ExecuteReader (behavior);
}
- [MonoTODO]
protected override DbConnection DbConnection {
- get { throw new NotImplementedException (); }
- set { throw new NotImplementedException (); }
+ get { return Connection; }
+ set { Connection = (OleDbConnection) value; }
}
- [MonoTODO]
protected override DbParameterCollection DbParameterCollection {
- get { throw new NotImplementedException (); }
+ get { return Parameters; }
}
- [MonoTODO]
protected override DbTransaction DbTransaction {
- get { throw new NotImplementedException (); }
- set { throw new NotImplementedException (); }
+ get { return Transaction; }
+ set { Transaction = (OleDbTransaction) value; }
}
#endif
Modified:
trunk/mcs/class/System.Data/System.Data.OleDb/OleDbParameterCollection.cs
===================================================================
--- trunk/mcs/class/System.Data/System.Data.OleDb/OleDbParameterCollection.cs
2007-10-19 05:24:09 UTC (rev 87810)
+++ trunk/mcs/class/System.Data/System.Data.OleDb/OleDbParameterCollection.cs
2007-10-19 05:32:09 UTC (rev 87811)
@@ -66,7 +66,7 @@
#region Properties
-#if !NET_2_0
+#if ONLY_1_1
[Browsable (false)]
[DesignerSerializationVisibility
(DesignerSerializationVisibility.Hidden)]
#endif
@@ -81,8 +81,8 @@
[Browsable (false)]
[DesignerSerializationVisibility
(DesignerSerializationVisibility.Hidden)]
public new OleDbParameter this[int index] {
- get { return (OleDbParameter) list[index]; }
- set { list[index] = value; }
+ get { return (OleDbParameter) list [index]; }
+ set { list[index] = (OleDbParameter) value; }
}
[Browsable (false)]
@@ -97,7 +97,7 @@
set {
if (!Contains (parameterName))
throw new IndexOutOfRangeException("The
specified name does not exist: " + parameterName);
- this [IndexOf (parameterName)] = value;
+ this [IndexOf (parameterName)] =
(OleDbParameter) value;
}
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches