Author: borisk
Date: 2005-09-07 10:01:31 -0400 (Wed, 07 Sep 2005)
New Revision: 49634

Modified:
   trunk/mcs/class/System.Data/System.Data.Common/ChangeLog
   trunk/mcs/class/System.Data/System.Data.Common/DataContainer.cs
Log:
Do not convert value if container type is System.Object.

Modified: trunk/mcs/class/System.Data/System.Data.Common/ChangeLog
===================================================================
--- trunk/mcs/class/System.Data/System.Data.Common/ChangeLog    2005-09-07 
13:54:13 UTC (rev 49633)
+++ trunk/mcs/class/System.Data/System.Data.Common/ChangeLog    2005-09-07 
14:01:31 UTC (rev 49634)
@@ -1,3 +1,7 @@
+2005-09-07 Boris Kirzner <[EMAIL PROTECTED]>
+       * DataContainer.cs: Do not convert value if container type 
+       is System.Object.
+
 2005-08-08  Gert Driesen  <[EMAIL PROTECTED]>
 
        * DbTypes.cs: Marked internal to fix public API.

Modified: trunk/mcs/class/System.Data/System.Data.Common/DataContainer.cs
===================================================================
--- trunk/mcs/class/System.Data/System.Data.Common/DataContainer.cs     
2005-09-07 13:54:13 UTC (rev 49633)
+++ trunk/mcs/class/System.Data/System.Data.Common/DataContainer.cs     
2005-09-07 14:01:31 UTC (rev 49634)
@@ -1090,7 +1090,7 @@
 
                        protected override void SetValue(int index, object 
value)
                        {
-                               if(value != null && value != DBNull.Value && 
!Type.IsAssignableFrom(value.GetType()))
+                               if(value != null && value != DBNull.Value && 
!(Type == DbTypes.TypeOfObject) && !Type.IsAssignableFrom(value.GetType()))
                                        value = Convert.ChangeType(value, Type);
 
                                base.SetValue(index, value);

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

Reply via email to