Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kirzner <borisk@mono-cvs.ximian.com>2005-09-07 18:01:31 +0400
committerBoris Kirzner <borisk@mono-cvs.ximian.com>2005-09-07 18:01:31 +0400
commitdf3384d411064c49f958300bad6242817e55c115 (patch)
treed5d29502fa33e07c8fbc19e0dc644749f8358cef /mcs/class/System.Data/System.Data.Common
parentd51e206942e02a6b4c9082527970563ecf700c05 (diff)
Do not convert value if container type is System.Object.
svn path=/trunk/mcs/; revision=49634
Diffstat (limited to 'mcs/class/System.Data/System.Data.Common')
-rw-r--r--mcs/class/System.Data/System.Data.Common/ChangeLog4
-rw-r--r--mcs/class/System.Data/System.Data.Common/DataContainer.cs2
2 files changed, 5 insertions, 1 deletions
diff --git a/mcs/class/System.Data/System.Data.Common/ChangeLog b/mcs/class/System.Data/System.Data.Common/ChangeLog
index 177a733cbf5..a588789138b 100644
--- a/mcs/class/System.Data/System.Data.Common/ChangeLog
+++ b/mcs/class/System.Data/System.Data.Common/ChangeLog
@@ -1,3 +1,7 @@
+2005-09-07 Boris Kirzner <borisk@mainsoft.com>
+ * DataContainer.cs: Do not convert value if container type
+ is System.Object.
+
2005-08-08 Gert Driesen <drieseng@users.sourceforge.net>
* DbTypes.cs: Marked internal to fix public API.
diff --git a/mcs/class/System.Data/System.Data.Common/DataContainer.cs b/mcs/class/System.Data/System.Data.Common/DataContainer.cs
index 4ce888fbf59..70074d581a8 100644
--- a/mcs/class/System.Data/System.Data.Common/DataContainer.cs
+++ b/mcs/class/System.Data/System.Data.Common/DataContainer.cs
@@ -1090,7 +1090,7 @@ namespace System.Data.Common
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);