Fix DataRow error management
authorShay Rojansky <roji@eaglets.co.il>
Sun, 20 Jul 2014 12:48:21 +0000 (15:48 +0300)
committerShay Rojansky <roji@eaglets.co.il>
Sun, 20 Jul 2014 12:48:21 +0000 (15:48 +0300)
DataRow's RowError is supposed to be String.Empty to indicate
no errors, but is sometimes wrongly set to null, falsely indicating
errors. Fixed to be String.Empty.

mcs/class/System.Data/System.Data.Common/DbDataAdapter.cs
mcs/class/System.Data/System.Data/DataRow.cs

index f438cb100f1536a8c552ffb0729631cc438950e4..18ac3aab9c6918c9207a64dda469debe79ba67d9 100644 (file)
@@ -659,7 +659,7 @@ namespace System.Data.Common
                                }
 
                                RowUpdatingEventArgs argsUpdating = CreateRowUpdatingEvent (row, command, statementType, tableMapping);
-                               row.RowError = null;
+                               row.RowError = String.Empty;
                                OnRowUpdating (argsUpdating);
                                switch (argsUpdating.Status) {
                                case UpdateStatus.Continue :
index f3fa2a8e77c18d2c4a9bd50b60a1bb2f62bc8dea..4207d16f878dbb43dea2f68edd7005a150ecf654 100644 (file)
@@ -96,6 +96,7 @@ namespace System.Data {
                {
                        _table = table;
                        _rowId = rowId;
+                       rowError = String.Empty;
                }
 
                #endregion // Constructors