[Mono-bugs] [Bug 70541][Wis] New - InvalidCastException when casting DataTable.Select to typed DataSet

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Mon, 13 Dec 2004 23:43:35 -0500 (EST)

Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by arit93@yahoo.com.


--- shadow/70541	2004-12-13 23:43:34.000000000 -0500
+++ shadow/70541.tmp.20311	2004-12-13 23:43:34.000000000 -0500
@@ -0,0 +1,37 @@
+Bug#: 70541
+Product: Mono: Runtime
+Version: 1.1
+OS Details: Gentoo 2004.0
+Status: NEW   
+Priority: Wishlist
+Component: JIT
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: arit93@yahoo.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+Summary: InvalidCastException when casting DataTable.Select to typed DataSet
+When using a typed dataset I am unable to cast the results of the select
+method to an array of the typed dataset table.rows.  This is possible under
+windows with .NET 1.1
+Steps to reproduce the problem:
+1. Create a typed dataset
+ for example a typed dataset called mytypedDS with a table Day
+  attempt the following:
+   mytypedDS mtd = new mytpedDS();
+   mytypedDS.DayRow[] dayrow = (mytypedDS.DayRow[])mtd.Day.Select("filter");
+  This generates an InvalidCast error in mono 1.1
+mono JIT compiler 1.0.4
+  Currently the workaround I have come up with is while processing the
+found rows to cast them individually to the mytypedDS.DayRow  that seems to
+work.  The only issue is with the array.