2007-10-08 Marek Safar <marek.safar@gmail.com>
[mono.git] / mcs / class / System.Data / System.Data.Odbc / OdbcDataAdapter.cs
old mode 100755 (executable)
new mode 100644 (file)
index 8423ac6..991bc77
@@ -42,11 +42,13 @@ namespace System.Data.Odbc {
        [DefaultEvent ("RowUpdated")]
        [DesignerAttribute ("Microsoft.VSDesigner.Data.VS.OdbcDataAdapterDesigner, "+ Consts.AssemblyMicrosoft_VSDesigner, "System.ComponentModel.Design.IDesigner")]
        [ToolboxItemAttribute ("Microsoft.VSDesigner.Data.VS.OdbcDataAdapterToolboxItem, "+ Consts.AssemblyMicrosoft_VSDesigner)]
-       public sealed class OdbcDataAdapter : DbDataAdapter, IDbDataAdapter 
+       public sealed class OdbcDataAdapter : DbDataAdapter, IDbDataAdapter, ICloneable
        {
                #region Fields
 
-               bool disposed = false;  
+#if ONLY_1_1
+               bool disposed = false;
+#endif
                OdbcCommand deleteCommand;
                OdbcCommand insertCommand;
                OdbcCommand selectCommand;
@@ -56,8 +58,7 @@ namespace System.Data.Odbc {
 
                #region Constructors
                
-               public OdbcDataAdapter ()       
-                       : this (new OdbcCommand ())
+               public OdbcDataAdapter () : this (new OdbcCommand ())
                {
                }
 
@@ -87,7 +88,7 @@ namespace System.Data.Odbc {
                [OdbcDescription ("Used during Update for deleted rows in DataSet.")]
                [DefaultValue (null)]
                [EditorAttribute ("Microsoft.VSDesigner.Data.Design.DBCommandEditor, "+ Consts.AssemblyMicrosoft_VSDesigner, "System.Drawing.Design.UITypeEditor, "+ Consts.AssemblySystem_Drawing )]
-               public OdbcCommand DeleteCommand {
+               public new OdbcCommand DeleteCommand {
                        get { return deleteCommand; }
                        set { deleteCommand = value; }
                }
@@ -96,7 +97,7 @@ namespace System.Data.Odbc {
                [OdbcDescription ("Used during Update for new rows in DataSet.")]
                [DefaultValue (null)]
                [EditorAttribute ("Microsoft.VSDesigner.Data.Design.DBCommandEditor, "+ Consts.AssemblyMicrosoft_VSDesigner, "System.Drawing.Design.UITypeEditor, "+ Consts.AssemblySystem_Drawing )]
-               public OdbcCommand InsertCommand {
+               public new OdbcCommand InsertCommand {
                        get { return insertCommand; }
                        set { insertCommand = value; }
                }
@@ -105,7 +106,7 @@ namespace System.Data.Odbc {
                [OdbcDescription ("Used during Fill/FillSchema.")]
                [DefaultValue (null)]
                [EditorAttribute ("Microsoft.VSDesigner.Data.Design.DBCommandEditor, "+ Consts.AssemblyMicrosoft_VSDesigner, "System.Drawing.Design.UITypeEditor, "+ Consts.AssemblySystem_Drawing )]
-               public OdbcCommand SelectCommand {
+               public new OdbcCommand SelectCommand {
                        get { return selectCommand; }
                        set { selectCommand = value; }
                }
@@ -114,7 +115,7 @@ namespace System.Data.Odbc {
                [OdbcDescription ("Used during Update for modified rows in DataSet.")]
                [DefaultValue (null)]
                [EditorAttribute ("Microsoft.VSDesigner.Data.Design.DBCommandEditor, "+ Consts.AssemblyMicrosoft_VSDesigner, "System.Drawing.Design.UITypeEditor, "+ Consts.AssemblySystem_Drawing )]
-               public OdbcCommand UpdateCommand {
+               public new OdbcCommand UpdateCommand {
                        get { return updateCommand; }
                        set { updateCommand = value; }
                }
@@ -175,6 +176,7 @@ namespace System.Data.Odbc {
                        return new OdbcRowUpdatingEventArgs (dataRow, command, statementType, tableMapping);
                }
 
+#if ONLY_1_1
                protected override void Dispose (bool disposing)
                {
                        if (!disposed) {
@@ -185,6 +187,7 @@ namespace System.Data.Odbc {
                                disposed = true;
                        }
                }
+#endif
 
                protected override void OnRowUpdated (RowUpdatedEventArgs value) 
                {
@@ -198,6 +201,12 @@ namespace System.Data.Odbc {
                                RowUpdating (this, (OdbcRowUpdatingEventArgs) value);
                }
 
+               [MonoTODO]
+               object ICloneable.Clone ()
+               {
+                       throw new NotImplementedException ();
+               }
+
                #endregion // Methods
 
                #region Events and Delegates