Author: anagappan
Date: 2007-02-23 08:23:13 -0500 (Fri, 23 Feb 2007)
New Revision: 73359

Modified:
   trunk/mcs/class/System.Data/System.Data/ChangeLog
   trunk/mcs/class/System.Data/System.Data/DataRow.cs
   trunk/mcs/class/System.Data/System.Data/DataRowCollection.cs
Log:
2007-02-23  Nagappan A  <[EMAIL PROTECTED]>

        * DataRow.cs (Item): Checks whether this DataRow exist in the
        DataRowCollection, then compute the expression. Fixes bug #
        80505.

        * DataRowCollection.cs (IndexOf): Modified as internal method for
        1.0 profile.



Modified: trunk/mcs/class/System.Data/System.Data/ChangeLog
===================================================================
--- trunk/mcs/class/System.Data/System.Data/ChangeLog   2007-02-23 11:15:22 UTC 
(rev 73358)
+++ trunk/mcs/class/System.Data/System.Data/ChangeLog   2007-02-23 13:23:13 UTC 
(rev 73359)
@@ -1,5 +1,12 @@
 2007-02-23  Nagappan A  <[EMAIL PROTECTED]>
 
+       * DataRow.cs (Item): Checks whether this DataRow exist in the
+       DataRowCollection, then compute the expression. Fixes bug #
+       80505.
+
+       * DataRowCollection.cs (IndexOf): Modified as internal method for
+       1.0 profile.
+
        * XmlDataReader.cs (StringToObject): DataTables containing
        System.Type throw exception on deserializing. Fixes bug # 80596.
 

Modified: trunk/mcs/class/System.Data/System.Data/DataRow.cs
===================================================================
--- trunk/mcs/class/System.Data/System.Data/DataRow.cs  2007-02-23 11:15:22 UTC 
(rev 73358)
+++ trunk/mcs/class/System.Data/System.Data/DataRow.cs  2007-02-23 13:23:13 UTC 
(rev 73359)
@@ -255,7 +255,7 @@
                                DataColumn column = _table.Columns[columnIndex];
                                int recordIndex = IndexFromVersion(version);
 
-                               if (column.Expression != String.Empty) {
+                               if (column.Expression != String.Empty && 
_table.Rows.IndexOf (this) != -1) {
                                        object o = 
column.CompiledExpression.Eval (this);
                                        if (o != null && o != DBNull.Value) {
                                                o = Convert.ChangeType (o, 
column.DataType);

Modified: trunk/mcs/class/System.Data/System.Data/DataRowCollection.cs
===================================================================
--- trunk/mcs/class/System.Data/System.Data/DataRowCollection.cs        
2007-02-23 11:15:22 UTC (rev 73358)
+++ trunk/mcs/class/System.Data/System.Data/DataRowCollection.cs        
2007-02-23 13:23:13 UTC (rev 73359)
@@ -119,7 +119,11 @@
                }
 
 #if NET_2_0
-               public int IndexOf (DataRow row) 
+               public
+#else
+               internal
+#endif
+               int IndexOf (DataRow row) 
                {
                        if (row == null)
                                return -1;
@@ -134,7 +138,7 @@
 
                        return -1;
                }
-#endif
+
                internal void AddInternal (DataRow row) {
                        AddInternal (row, DataRowAction.Add);
                }

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to