2002-05-11 Rodrigo Moya <rodrigo@ximian.com>
authorRodrigo Moya <rodrigo@mono-cvs.ximian.com>
Sat, 11 May 2002 19:31:30 +0000 (19:31 -0000)
committerRodrigo Moya <rodrigo@mono-cvs.ximian.com>
Sat, 11 May 2002 19:31:30 +0000 (19:31 -0000)
* System.Data/DataTable.cs (Clear): implemented.
(DataTable): removed repeated code in constructors, and call the
basic constructor from the others.

* System.Data/DataColumn.cs: some tweaks.

* System.Data/DataRow.cs (RowState): implemented.
(CancelEdit): set rowState property back to Unchanged.
(RejectChanges): call CancelEdit.
(Delete): set rowState to Deleted.

svn path=/trunk/mcs/; revision=4534

mcs/class/System.Data/ChangeLog
mcs/class/System.Data/System.Data/DataColumn.cs
mcs/class/System.Data/System.Data/DataRow.cs
mcs/class/System.Data/System.Data/DataRowCollection.cs
mcs/class/System.Data/System.Data/DataTable.cs

index bdebf288584f9ecd40a956ac6144f6bb4ef68d22..314506d11f4e4ba8e6958555f15b209dcac0091b 100644 (file)
@@ -1,3 +1,16 @@
+2002-05-11  Rodrigo Moya <rodrigo@ximian.com>
+
+       * System.Data/DataTable.cs (Clear): implemented.
+       (DataTable): removed repeated code in constructors, and call the
+       basic constructor from the others.
+
+       * System.Data/DataColumn.cs: some tweaks.
+
+       * System.Data/DataRow.cs (RowState): implemented.
+       (CancelEdit): set rowState property back to Unchanged.
+       (RejectChanges): call CancelEdit.
+       (Delete): set rowState to Deleted.
+
 2002-05-11  Daniel Morgan <danmorg@sc.rr.com>
 
        * System.Data.build: added copy of System.Data.dll to Test directory
index d7f1bf55a07c0bdd35a46465662d34cf2987a880..91d99f31ec381275e88e90dbd3832d370be33fbf 100644 (file)
@@ -19,7 +19,7 @@ namespace System.Data
        /// <summary>
        /// Summary description for DataColumn.
        /// </summary>
-       public class DataColumn
+       public class DataColumn : MarshalByValueComponent
        {               
                #region Fields
 
@@ -28,9 +28,7 @@ namespace System.Data
                private long autoIncrementSeed = 0;
                private long autoIncrementStep = 1;
                private string caption = null;
-               // FIXME: what does ms.net do for default of columnMapping
-               //        when not specified by the constructor?
-               private MappingType columnMapping = MappingType.SimpleContent; // default?
+               private MappingType columnMapping = MappingType.Element;
                private string columnName = null;
                private Type dataType = null;
                private object defaultValue = null;
@@ -59,8 +57,7 @@ namespace System.Data
 
                public DataColumn(string columnName, Type dataType): this(columnName)
                {
-                       if(dataType == null)
-                       {
+                       if(dataType == null) {
                                throw new ArgumentNullException();
                        }
                        
@@ -85,12 +82,10 @@ namespace System.Data
                
                public bool AllowDBNull
                {
-                       get
-                       {
+                       get {
                                return allowDBNull;
                        }
-                       set
-                       {
+                       set {
                                allowDBNull = value;
                        }
                }
@@ -106,12 +101,10 @@ namespace System.Data
                ///     </remarks>
                public bool AutoIncrement
                {
-                       get
-                       {
+                       get {
                                return autoIncrement;
                        }
-                       set
-                       {
+                       set {
                                autoIncrement = value;
                                if(autoIncrement == true)
                                {
@@ -132,75 +125,63 @@ namespace System.Data
 
                public long AutoIncrementSeed
                {
-                       get
-                       {
+                       get {
                                return autoIncrementSeed;
                        }
-                       set
-                       {
+                       set {
                                autoIncrementSeed = value;
                        }
                }
 
                public long AutoIncrementStep
                {
-                       get
-                       {
+                       get {
                                return autoIncrementStep;
                        }
-                       set
-                       {
+                       set {
                                autoIncrementStep = value;
                        }
                }
 
                public string Caption 
                {
-                       get
-                       {
+                       get {
                                if(caption == null)
                                        return columnName;
                                else
                                        return caption;
                        }
-                       set
-                       {
+                       set {
                                caption = value;
                        }
                }
 
                public virtual MappingType ColumnMapping
                {
-                       get
-                       {
+                       get {
                                return columnMapping;
                        }
-                       set
-                       {
+                       set {
                                columnMapping = value;
                        }
                }
 
                public string ColumnName
                {
-                       get
-                       {
+                       get {
                                return columnName;
                        }
-                       set
-                       {
+                       set {
                                columnName = value;
                        }
                }
 
                public Type DataType
                {
-                       get
-                       {
+                       get {
                                return dataType;
                        }
-                       set
-                       {
+                       set {
                                if(AutoIncrement == true && 
                                   Type.GetTypeCode(value) != TypeCode.Int32)
                                {
@@ -216,56 +197,47 @@ namespace System.Data
                /// <remarks>When AutoIncrement is set to true, there can be no default value.</remarks>
                public object DefaultValue
                {
-                       get
-                       {
+                       get {
                                return defaultValue;
                        }
-                       set
-                       {
+                       set {
                                defaultValue = value;
                        }
                }
 
                public string Expression
                {
-                       get
-                       {
+                       get {
                                return expression;
                        }
-                       set
-                       {
+                       set {
                                expression = value;
                        }
                }
 
                public PropertyCollection ExtendedProperties
                {
-                       get
-                       {
+                       get {
                                return extendedProperties;
                        }
                }
 
                public int MaxLength
                {
-                       get
-                       {
+                       get {
                                return maxLength;
                        }
-                       set
-                       {
+                       set {
                                maxLength = value;
                        }
                }
 
                public string Namespace
                {
-                       get
-                       {
+                       get {
                                return nameSpace;
                        }
-                       set
-                       {
+                       set {
                                nameSpace = value;
                        }
                }
@@ -273,52 +245,44 @@ namespace System.Data
                //Need a good way to set the Ordinal when the column is added to a columnCollection.
                public int Ordinal
                {
-                       get
-                       {
+                       get {
                                return ordinal;
                        }
                }
 
                public string Prefix
                {
-                       get
-                       {
+                       get {
                                return prefix;
                        }
-                       set
-                       {
+                       set {
                                prefix = value;
                        }
                }
 
                public bool ReadOnly
                {
-                       get
-                       {
+                       get {
                                return readOnly;
                        }
-                       set
-                       {
+                       set {
                                readOnly = value;
                        }
                }
 
                public DataTable Table
                {
-                       get
-                       {
+                       get {
                                return table;
                        }
                }
 
                public bool Unique
                {
-                       get
-                       {
+                       get {
                                return unique;
                        }
-                       set
-                       {
+                       set {
                                unique = value;
                        }
                }
@@ -352,14 +316,10 @@ namespace System.Data
                [MonoTODO]
                public override string ToString()
                {
-                       if(expression != null && expression != string.Empty)
-                       {
+                       if (expression != null)
                                return expression;
-                       }
-                       else
-                       {
-                               return columnName;
-                       }
+                       
+                       return columnName;
                }
 
                [MonoTODO]
index 6a2814e606b25826220e60546a34209dfc3ef661..45ed449db8160104ab5da91ce336fe414d19c346 100644 (file)
@@ -21,16 +21,17 @@ namespace System.Data
        {
                #region Fields
 
-               private ArrayList columns = new ArrayList();
-               private ArrayList columnNames = new ArrayList();
+               private ArrayList columns = new ArrayList ();
+               private ArrayList columnNames = new ArrayList ();
                private DataTable table = null;
+               private DataRowState rowState = DataRowState.Unchanged;
 
                #endregion
 
                #region Methods
 
                [MonoTODO]
-               public void AcceptChanges() {
+               public void AcceptChanges () {
                        throw new NotImplementedException ();
                }
 
@@ -41,7 +42,8 @@ namespace System.Data
 
                [MonoTODO]
                public void CancelEdit() {
-                       throw new NotImplementedException ();
+                       // FIXME: throw changes away
+                       rowState = DataRowState.Unchanged;
                }
 
                [MonoTODO]
@@ -49,9 +51,8 @@ namespace System.Data
                        throw new NotImplementedException ();
                }
 
-               [MonoTODO]
                public void Delete() {
-                       throw new NotImplementedException ();
+                       rowState = DataRowState.Deleted;
                }
 
                [MonoTODO]
@@ -60,142 +61,142 @@ namespace System.Data
                }
 
                [MonoTODO]
-               public DataRow[] GetChildRows(DataRelation dr) {
+               public DataRow[] GetChildRows (DataRelation dr) {
                        throw new NotImplementedException ();
                }
 
                [MonoTODO]
-               public DataRow[] GetChildRows(string s) {
+               public DataRow[] GetChildRows (string s) {
                        throw new NotImplementedException ();
                }
 
                [MonoTODO]
-               public DataRow[] GetChildRows(DataRelation dr, DataRowVersion version) {
+               public DataRow[] GetChildRows (DataRelation dr, DataRowVersion version) {
                        throw new NotImplementedException ();
                }
 
                [MonoTODO]
-               public DataRow[] GetChildRows(string s, DataRowVersion version) {
+               public DataRow[] GetChildRows (string s, DataRowVersion version) {
                        throw new NotImplementedException ();
                }
 
                [MonoTODO]
-               public string GetColumnError(DataColumn col) {
+               public string GetColumnError (DataColumn col) {
                        throw new NotImplementedException ();
                }
 
                [MonoTODO]
-               public string GetColumnError(int index) {
+               public string GetColumnError (int index) {
                        throw new NotImplementedException ();
                }
 
                [MonoTODO]
-               public string GetColumnError(string s) {
+               public string GetColumnError (string s) {
                        throw new NotImplementedException ();
                }
 
                [MonoTODO]
-               public DataColumn[] GetColumnsInError() {
+               public DataColumn[] GetColumnsInError () {
                        throw new NotImplementedException ();
                }
 
                [MonoTODO]
-               public DataRow GetParentRow(DataRelation dr) {
+               public DataRow GetParentRow (DataRelation dr) {
                        throw new NotImplementedException ();
                }
 
                [MonoTODO]
-               public DataRow GetParentRow(string s) {
+               public DataRow GetParentRow (string s) {
                        throw new NotImplementedException ();
                }
 
                [MonoTODO]
-               public DataRow GetParentRow(DataRelation dr, DataRowVersion version) {
+               public DataRow GetParentRow (DataRelation dr, DataRowVersion version) {
                        throw new NotImplementedException ();
                }
 
                [MonoTODO]
-               public DataRow GetParentRow(string s, DataRowVersion version) {
+               public DataRow GetParentRow (string s, DataRowVersion version) {
                        throw new NotImplementedException ();
                }
 
                [MonoTODO]
-               public DataRow[] GetParentRows(DataRelation dr) {
+               public DataRow[] GetParentRows (DataRelation dr) {
                        throw new NotImplementedException ();
                }
 
                [MonoTODO]
-               public DataRow[] GetParentRows(string s) {
+               public DataRow[] GetParentRows (string s) {
                        throw new NotImplementedException ();
                }
 
                [MonoTODO]
-               public DataRow[] GetParentRows(DataRelation dr, DataRowVersion version) {
+               public DataRow[] GetParentRows (DataRelation dr, DataRowVersion version) {
                        throw new NotImplementedException ();
                }
 
                [MonoTODO]
-               public DataRow[] GetParentRows(string s, DataRowVersion version) {
+               public DataRow[] GetParentRows (string s, DataRowVersion version) {
                        throw new NotImplementedException ();
                }
 
                [MonoTODO]
-               public bool HasVersion(DataRowVersion version) {
+               public bool HasVersion (DataRowVersion version) {
                        throw new NotImplementedException ();
                }
 
                [MonoTODO]
-               public bool IsNull(DataColumn dc) {
+               public bool IsNull (DataColumn dc) {
                        throw new NotImplementedException ();
                }
 
                [MonoTODO]
-               public bool IsNull(int i) {
+               public bool IsNull (int i) {
                        throw new NotImplementedException ();
                }
 
                [MonoTODO]
-               public bool IsNull(string s) {
+               public bool IsNull (string s) {
                        throw new NotImplementedException ();
                }
 
                [MonoTODO]
-               public bool IsNull(DataColumn dc, DataRowVersion version) {
+               public bool IsNull (DataColumn dc, DataRowVersion version) {
                        throw new NotImplementedException ();
                }
 
                [MonoTODO]
-               public void RejectChanges() {
-                       throw new NotImplementedException ();
+               public void RejectChanges () {
+                       CancelEdit ();
                }
 
                [MonoTODO]
-               public void SetColumnError(DataColumn dc, string err) {
+               public void SetColumnError (DataColumn dc, string err) {
                        throw new NotImplementedException ();
                }
 
                [MonoTODO]
-               public void SetColumnError(int i, string err) {
+               public void SetColumnError (int i, string err) {
                        throw new NotImplementedException ();
                }
 
                [MonoTODO]
-               public void SetColumnError(string a, string err) {
+               public void SetColumnError (string a, string err) {
                        throw new NotImplementedException ();
                }
 
                [MonoTODO]
-               public void SetParentRow(DataRow row) {
+               public void SetParentRow (DataRow row) {
                        throw new NotImplementedException ();
                }
 
                [MonoTODO]
-               public void SetParentRow(DataRow row, DataRelation rel) {
+               public void SetParentRow (DataRow row, DataRelation rel) {
                        throw new NotImplementedException ();
                }
 
                [MonoTODO]
-               protected void SetNull(DataColumn column) {
+               protected void SetNull (DataColumn column) {
                        throw new NotImplementedException ();
                }
                
@@ -205,67 +206,96 @@ namespace System.Data
 
                public bool HasErrors {
                        [MonoTODO]
-                       get { throw new NotImplementedException (); }
+                       get {
+                               throw new NotImplementedException ();
+                       }
                }
 
                public object this[string s] {
                        [MonoTODO]
-                       get { throw new NotImplementedException (); }
+                       get {
+                               throw new NotImplementedException ();
+                       }
 
                        [MonoTODO]
-                       set { throw new NotImplementedException (); }
+                       set {
+                               throw new NotImplementedException ();
+                       }
                }
 
                public object this[DataColumn dc] {
                        [MonoTODO]
-                       get { throw new NotImplementedException (); }
+                       get {
+                               throw new NotImplementedException ();
+                       }
 
                        [MonoTODO]
-                       set { throw new NotImplementedException (); }
+                       set {
+                               throw new NotImplementedException ();
+                       }
                }
 
                public object this[int i] {
                        [MonoTODO]
-                       get { throw new NotImplementedException (); }
+                       get {
+                               throw new NotImplementedException ();
+                       }
 
                        [MonoTODO]
-                       set { throw new NotImplementedException (); }
+                       set {
+                               throw new NotImplementedException ();
+                       }
                }
 
                public object this[string s, DataRowVersion version] {
                        [MonoTODO]
-                       get { throw new NotImplementedException (); }
+                       get {
+                               throw new NotImplementedException ();
+                       }
                }
 
                public object this[DataColumn dc, DataRowVersion version] {
                        [MonoTODO]
-                       get { throw new NotImplementedException (); }
+                       get {
+                               throw new NotImplementedException ();
+                       }
                }
 
                public object this[int i, DataRowVersion version] {
                        [MonoTODO]
-                       get { throw new NotImplementedException (); }
+                       get {
+                               throw new NotImplementedException ();
+                       }
                }
 
                public object[] ItemArray {
                        [MonoTODO]
-                       get { throw new NotImplementedException (); }
+                       get {
+                               throw new NotImplementedException ();
+                       }
 
                        [MonoTODO]
-                       set { throw new NotImplementedException (); }
+                       set {
+                               throw new NotImplementedException ();
+                       }
                }
 
                public string RowError {
                        [MonoTODO]
-                       get { throw new NotImplementedException (); }
+                       get {
+                               throw new NotImplementedException ();
+                       }
 
                        [MonoTODO]
-                       set { throw new NotImplementedException (); }
+                       set {
+                               throw new NotImplementedException ();
+                       }
                }
 
                public DataRowState RowState {
-                       [MonoTODO]
-                       get { throw new NotImplementedException (); }
+                       get {
+                               return rowState;
+                       }
                }
 
                public DataTable Table {
index d111d99aced65a2a04ca7a099ec37d09d60f199a..575d21b8119bc24893bbe345c579c596a6d75f85 100644 (file)
@@ -13,10 +13,10 @@ using System.ComponentModel;
 
 namespace System.Data
 {
-       /// <summary>\r
-       /// Collection of DataRows in a DataTable\r
+       /// <summary>
+       /// Collection of DataRows in a DataTable
        /// </summary>
-       [Serializable]\r
+       [Serializable]
        public class DataRowCollection : InternalDataCollectionBase {
 
                private ArrayList rows = null;
@@ -29,8 +29,8 @@ namespace System.Data
                        }
                }
 
-               [MonoTODO]\r
-               public void Add(DataRow row) {
+               [MonoTODO]
+               public void Add (DataRow row) {
                        rows.Add(row);
                }
 
@@ -39,7 +39,7 @@ namespace System.Data
                        throw new NotImplementedException ();
                }
 
-               [MonoTODO]\r
+               [MonoTODO]
                public void Clear() {
                        throw new NotImplementedException ();
                }
@@ -59,27 +59,27 @@ namespace System.Data
                        throw new NotImplementedException ();
                }
 
-               [MonoTODO]\r
+               [MonoTODO]
                public void InsertAt(DataRow row, int pos) {
                        throw new NotImplementedException ();
                }
 
-               [MonoTODO]\r
+               [MonoTODO]
                public void Remove(DataRow row) {
                        throw new NotImplementedException ();
                }
 \r
-               [MonoTODO]\r
-               public void RemoveAt(int index) {\r
-                       throw new NotImplementedException ();\r
-               }\r
-\r
-               [MonoTODO]\r
-               protected override ArrayList List {\r
-                       [MonoTODO]\r
-                       get {\r
-                               return rows;\r
-                       }\r
+               [MonoTODO]
+               public void RemoveAt(int index) {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               protected override ArrayList List {
+                       [MonoTODO]
+                       get {
+                               return rows;
+                       }
                }               
        }
 }
index 026c00c79c925ba3b266bb4dc474a8cef936695a..526895be2f8522cae77359ec7ddf23b61b327747 100644 (file)
@@ -22,8 +22,8 @@ namespace System.Data
        /// Represents one table of in-memory data.
        /// </summary>
        [Serializable]
-       public class DataTable : ISerializable
-                /* MarshalByValueComponent, IListSource, ISupportInitialize,*/
+               public class DataTable : ISerializable
+                //MarshalByValueComponent, IListSource, ISupportInitialize
        {
                
                private bool _caseSensitive;
@@ -91,45 +91,17 @@ namespace System.Data
                /// Intitalizes a new instance of the DataTable class with the specified table name.
                /// </summary>
                
-               public DataTable(string tableName)
+               public DataTable(string tableName) : this ()
                {
-                       // _dataSet = null;     // FIXME: temporarily commented
-                       // _defaultView = null; // FIXME: temporarily commented
-                       _columnCollection = new DataColumnCollection(this);
-                       //_constraintCollection = new ConstraintCollection(); TODO: uncomment after ConstraintCollection is built.
-                       _extendedProperties = null;
                        _tableName = tableName;
-                       _nameSpace = null;
-                       _caseSensitive = false;
-                       _displayExpression = null;
-                       _primaryKey = null;
-                       
-                       // FIXME: temporarily commented DataTableRelationCollection
-                       // _childRelations = new DataTableRelationCollection();
-                       // _parentRelations = new DataTableRelationCollection();
-
-                       //_nextRowID = 1;
-                       //_elementColumnCount = 0;
-                       //_caseSensitiveAmbient = true;
-                       //_culture = null; // _locale??
-                       //_compareFlags = 25; // why 25??
-                       //_fNestedInDataset = true; // what?
-                       _encodedTableName = tableName;
-                       //_xmlText = null; //??
-                       //_colUnique = null; //??
-                       //_textOnly = false; //??
-                       //repeatableElement = false; //??
-                       //zeroIntegers[]
-                       //zeroColumns[]
-                       //primaryIndex[]
-                       //delayedSetPrimaryKey = null; //??
                }
 
                /// <summary>
                /// Initializes a new instance of the DataTable class with the SerializationInfo and the StreamingContext.
                /// </summary>
                
-               protected DataTable(SerializationInfo info,     StreamingContext context)
+               protected DataTable(SerializationInfo info, StreamingContext context)
+                       : this ()
                {
                        //
                        // TODO: Add constructor logic here
@@ -142,12 +114,10 @@ namespace System.Data
                
                public bool CaseSensitive 
                {
-                       get
-                       {
+                       get {
                                return _caseSensitive;
                        }
-                       set
-                       {
+                       set {
                                _caseSensitive = value;
                        }
                }
@@ -159,8 +129,7 @@ namespace System.Data
                
                public DataRelationCollection ChildRelations
                {
-                       get
-                       {
+                       get {
                                // FIXME: temporarily commented to compile
                                // return (DataRelationCollection)_childRelations;
                                throw new NotImplementedException ();
@@ -173,8 +142,7 @@ namespace System.Data
                
                public DataColumnCollection Columns
                {
-                       get
-                       {
+                       get {
                                return _columnCollection;
                        }
                }
@@ -185,8 +153,7 @@ namespace System.Data
                
                public ConstraintCollection Constraints
                {
-                       get
-                       {
+                       get {
                                return _constraintCollection;
                        }
                }
@@ -227,12 +194,10 @@ namespace System.Data
                
                public string DisplayExpression 
                {
-                       get
-                       {
+                       get {
                                return _displayExpression;
                        }
-                       set
-                       {
+                       set {
                                _displayExpression = value;
                        }
                }
@@ -242,8 +207,7 @@ namespace System.Data
                /// </summary>
                public PropertyCollection ExtendedProperties
                {
-                       get
-                       {
+                       get {
                                return _extendedProperties;
                        }
                }
@@ -255,8 +219,7 @@ namespace System.Data
                /// </summary>
                public bool HasErrors
                {
-                       get
-                       {
+                       get {
                                return _hasErrors;
                        }
                }
@@ -267,12 +230,10 @@ namespace System.Data
                /// </summary>
                public CultureInfo Locale
                {
-                       get
-                       {
+                       get {
                                return _locale;
                        }
-                       set
-                       {
+                       set {
                                _locale = value;
                        }
                }
@@ -282,12 +243,10 @@ namespace System.Data
                /// </summary>
                public int MinimumCapacity
                {
-                       get
-                       {
+                       get {
                                return _minimumCapacity;
                        }
-                       set
-                       {
+                       set {
                                _minimumCapacity = value;
                        }
                }
@@ -298,12 +257,10 @@ namespace System.Data
                /// </summary>
                public string Namespace
                {
-                       get
-                       {
+                       get {
                                return _nameSpace;
                        }
-                       set
-                       {
+                       set {
                                _nameSpace = value;
                        }
                }
@@ -314,8 +271,7 @@ namespace System.Data
                /// </summary>
                public DataRelationCollection ParentRelations
                {
-                       get
-                       {       
+                       get {   
                                // FIXME: temporarily commented to compile
                                // return _parentRelations;
                                throw new NotImplementedException ();
@@ -328,12 +284,10 @@ namespace System.Data
                /// </summary>
                public string Prefix
                {
-                       get
-                       {
+                       get {
                                return _prefix;
                        }
-                       set
-                       {
+                       set {
                                _prefix = value;
                        }
                }
@@ -344,12 +298,10 @@ namespace System.Data
                /// </summary>
                public DataColumn[] PrimaryKey
                {
-                       get
-                       {
+                       get {
                                return _primaryKey;
                        }
-                       set
-                       {
+                       set {
                                _primaryKey = value;
                        }
                }
@@ -360,8 +312,7 @@ namespace System.Data
                
                public DataRowCollection Rows
                {
-                       get
-                       {
+                       get {
                                return _rows;
                        }
                }
@@ -373,12 +324,10 @@ namespace System.Data
                
                public virtual ISite Site
                {
-                       get
-                       {
+                       get {
                                return _site;
                        }
-                       set
-                       {
+                       set {
                                _site = value;
                        }
                }
@@ -389,12 +338,10 @@ namespace System.Data
                
                public string TableName
                {
-                       get
-                       {
+                       get {
                                return _tableName;
                        }
-                       set
-                       {
+                       set {
                                _tableName = value;
                        }
                }
@@ -402,8 +349,7 @@ namespace System.Data
                /* FIXME: implement IListSource
                public bool IListSource.ContainsListCollection
                {
-                       get
-                       {
+                       get {
                                return _containsListCollection;
                        }
                }
@@ -443,6 +389,7 @@ namespace System.Data
                
                public void Clear()
                {
+                       _rows.Clear ();
                }
 
                /// <summary>
@@ -520,10 +467,10 @@ namespace System.Data
                /// Gets an array of DataRow objects that contain errors.
                /// </summary>
                
-               //public DataRow[] GetErrors()
-               //{
-               //      return _rows;
-               //}
+               public DataRow[] GetErrors()
+               {
+                       throw new NotImplementedException ();
+               }
 
                /// <summary>
                /// This member supports the .NET Framework infrastructure
@@ -580,8 +527,8 @@ namespace System.Data
                /// </summary>
                public DataRow NewRow()
                {
-                       DataRow dataRow = new DataRow();
-                       dataRow.SetTable(this);
+                       DataRow dataRow = new DataRow ();
+                       dataRow.SetTable (this);
                        return dataRow;
                }