diff options
author | Miguel de Icaza <miguel@gnome.org> | 2010-03-26 19:40:27 +0300 |
---|---|---|
committer | Miguel de Icaza <miguel@gnome.org> | 2010-03-26 19:40:27 +0300 |
commit | 9a061465d5f56b2ab89cc05a58f78ea9d39d8366 (patch) | |
tree | cece1c569a1a24655234d010e64fd6e592d728e0 /mcs | |
parent | f122b42443ac07080a6e85edbf8bfdbdc2d39c4d (diff) |
2010-03-26 Miguel de Icaza <miguel@novell.com>
* RowEnumerableDataReader.cs: Applied patch from Tony Fish fixing
bug #591397
svn path=/branches/mono-2-6/mcs/; revision=154291
Diffstat (limited to 'mcs')
-rw-r--r-- | mcs/class/System.Data.DataSetExtensions/System.Data/ChangeLog | 5 | ||||
-rw-r--r-- | mcs/class/System.Data.DataSetExtensions/System.Data/RowEnumerableDataReader.cs | 16 |
2 files changed, 16 insertions, 5 deletions
diff --git a/mcs/class/System.Data.DataSetExtensions/System.Data/ChangeLog b/mcs/class/System.Data.DataSetExtensions/System.Data/ChangeLog index fa397259842..b6c487f060b 100644 --- a/mcs/class/System.Data.DataSetExtensions/System.Data/ChangeLog +++ b/mcs/class/System.Data.DataSetExtensions/System.Data/ChangeLog @@ -1,3 +1,8 @@ +2010-03-26 Miguel de Icaza <miguel@novell.com> + + * RowEnumerableDataReader.cs: Applied patch from Tony Fish fixing + bug #591397 + 2008-12-02 Marek Habersack <mhabersack@novell.com> * DataRowExtensions.cs: when Field <T> is specialized on a diff --git a/mcs/class/System.Data.DataSetExtensions/System.Data/RowEnumerableDataReader.cs b/mcs/class/System.Data.DataSetExtensions/System.Data/RowEnumerableDataReader.cs index 0e583bf611f..4a9e571abb1 100644 --- a/mcs/class/System.Data.DataSetExtensions/System.Data/RowEnumerableDataReader.cs +++ b/mcs/class/System.Data.DataSetExtensions/System.Data/RowEnumerableDataReader.cs @@ -44,8 +44,8 @@ namespace System.Data public RowEnumerableDataReader (IEnumerable source, int depth) { this.source = source as EnumerableRowCollection; - if (source == null) - source = new EnumerableRowCollection<DataRow> ((IEnumerable<DataRow>) source); + if (this.source == null) + this.source = new EnumerableRowCollection<DataRow> ((IEnumerable<DataRow>) source); this.depth = depth; } @@ -158,10 +158,16 @@ namespace System.Data public int GetValues (object [] values) { - // FIXME: do we need it? - throw new NotSupportedException (); - } + int fieldCount = FieldCount; + int i; + //target object is byval so we can not just assign new object[] to values , calling side will not change + //hence copy each item into values + for (i = 0; i < values.Length && i < fieldCount; ++i) + values[i] = Current[i]; + return i - 1; + } + public bool IsDBNull (int i) { return Current.IsNull (i); |