diff options
author | Boris Kirzner <borisk@mono-cvs.ximian.com> | 2004-05-27 14:36:17 +0400 |
---|---|---|
committer | Boris Kirzner <borisk@mono-cvs.ximian.com> | 2004-05-27 14:36:17 +0400 |
commit | d4242205323c54a2a26d32c3750589e70db78104 (patch) | |
tree | 2ce8b780026ce37ec5b80038e995a92db13ce4d3 | |
parent | a5c830fc409b0e8c17e57732c028bd117c2fe91d (diff) |
* DataContainer.cs : Bug fixes in BitDataContainer.get_Item and StringDataContainer.SetValue .
svn path=/trunk/mcs/; revision=28244
-rwxr-xr-x | mcs/class/System.Data/System.Data.Common/ChangeLog | 3 | ||||
-rw-r--r-- | mcs/class/System.Data/System.Data.Common/DataContainer.cs | 11 |
2 files changed, 11 insertions, 3 deletions
diff --git a/mcs/class/System.Data/System.Data.Common/ChangeLog b/mcs/class/System.Data/System.Data.Common/ChangeLog index ee2a893a0b4..2dc721eb4e6 100755 --- a/mcs/class/System.Data/System.Data.Common/ChangeLog +++ b/mcs/class/System.Data/System.Data.Common/ChangeLog @@ -1,3 +1,6 @@ +2004-05-27 Boris Kirzner <borisk@mainsoft.com> + * DataContainer.cs : Bug fixes in BitDataContainer.get_Item and StringDataContainer.SetValue . + 2004-05-20 Gert Driesen (drieseng@users.sourceforge.net) * DbDataPermissionAttribute.cs: change AllowMultiple and diff --git a/mcs/class/System.Data/System.Data.Common/DataContainer.cs b/mcs/class/System.Data/System.Data.Common/DataContainer.cs index aea2c815f33..244876eafa6 100644 --- a/mcs/class/System.Data/System.Data.Common/DataContainer.cs +++ b/mcs/class/System.Data/System.Data.Common/DataContainer.cs @@ -761,7 +761,7 @@ namespace System.Data.Common return DBNull.Value; } else { - return !isNull; + return _values[index]; } } set { @@ -941,8 +941,13 @@ namespace System.Data.Common protected override void SetValue(int index, object value) { - if ( value != null && value != DBNull.Value && !(value is string)) { - SetValue(index, Convert.ToString(value)); + if ( value != null && value != DBNull.Value ) { + if ( value is string ) { + SetValue(index, (string) value); + } + else { + SetValue(index, Convert.ToString(value)); + } return; } |