diff options
author | Sureshkumar T <suresh@mono-cvs.ximian.com> | 2005-06-29 15:31:11 +0400 |
---|---|---|
committer | Sureshkumar T <suresh@mono-cvs.ximian.com> | 2005-06-29 15:31:11 +0400 |
commit | 30147b28c8b6cda9abb3b2140c570d31f47c2e99 (patch) | |
tree | 3d03762a5bb72ad81e574946363d7f6f8225afd4 /mcs/class/System.Data/Mono.Data.SqlExpressions | |
parent | 33632b0cc21bfc087a8f2a734936fd1cc03a2fa9 (diff) |
2005-06-29 Sureshkumar T <tsureshkumar@novell.com>
* ArithmeticExpressions.cs: Eval :if any one of the argument is
null for an operator, the result is also NULL.
svn path=/trunk/mcs/; revision=46715
Diffstat (limited to 'mcs/class/System.Data/Mono.Data.SqlExpressions')
-rw-r--r-- | mcs/class/System.Data/Mono.Data.SqlExpressions/ArithmeticExpressions.cs | 6 | ||||
-rw-r--r-- | mcs/class/System.Data/Mono.Data.SqlExpressions/ChangeLog | 5 |
2 files changed, 8 insertions, 3 deletions
diff --git a/mcs/class/System.Data/Mono.Data.SqlExpressions/ArithmeticExpressions.cs b/mcs/class/System.Data/Mono.Data.SqlExpressions/ArithmeticExpressions.cs index ca3452b7b64..dc4e08412c9 100644 --- a/mcs/class/System.Data/Mono.Data.SqlExpressions/ArithmeticExpressions.cs +++ b/mcs/class/System.Data/Mono.Data.SqlExpressions/ArithmeticExpressions.cs @@ -50,14 +50,14 @@ namespace Mono.Data.SqlExpressions { override public object Eval (DataRow row) { object obj1 = expr1.Eval (row); - if (obj1 == DBNull.Value) + if (obj1 == DBNull.Value || obj1 == null) return obj1; object obj2 = expr2.Eval (row); - if (obj2 == DBNull.Value) + if (obj2 == DBNull.Value || obj2 == null) return obj2; if (op == Operation.ADD && (obj1 is string || obj2 is string)) - return (obj1 != null ? obj1.ToString () : String.Empty) + (obj2 != null ? obj2.ToString () : String.Empty); + return obj1.ToString () + obj2.ToString (); IConvertible o1 = (IConvertible)obj1; IConvertible o2 = (IConvertible)obj2; diff --git a/mcs/class/System.Data/Mono.Data.SqlExpressions/ChangeLog b/mcs/class/System.Data/Mono.Data.SqlExpressions/ChangeLog index 25234b12b86..a940572d800 100644 --- a/mcs/class/System.Data/Mono.Data.SqlExpressions/ChangeLog +++ b/mcs/class/System.Data/Mono.Data.SqlExpressions/ChangeLog @@ -1,3 +1,8 @@ +2005-06-29 Sureshkumar T <tsureshkumar@novell.com> + + * ArithmeticExpressions.cs: Eval :if any one of the argument is + null for an operator, the result is also NULL. + 2005-05-02 Konstantin Triger <kostat@mainsoft.com> * IExpression interface: Added DependsOn(DataColumn) method, which checks whether the Expression contains a specific column |