[Mono-bugs] [Bug 60118][Nor] New - XmlDataReader.Process() fails if DataTable name is the same as DataSet name

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Sun, 13 Jun 2004 06:21:31 -0400 (EDT)


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 borisk@mainsoft.com.

http://bugzilla.ximian.com/show_bug.cgi?id=60118

--- shadow/60118	2004-06-13 06:21:31.000000000 -0400
+++ shadow/60118.tmp.18823	2004-06-13 06:21:31.000000000 -0400
@@ -0,0 +1,58 @@
+Bug#: 60118
+Product: Mono: Class Libraries
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Sys.Data
+AssignedTo: atsushi@ximian.com                            
+ReportedBy: borisk@mainsoft.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Summary: XmlDataReader.Process() fails if DataTable name is the same as DataSet name
+
+Description of Problem:
+When reading xml with data table name equals to data set name, the
+resulting dataset does not holds all the data.
+
+Steps to reproduce the problem:
+1. Create xml with dataset name equal to data table name , for example : 
+<PriceListDetails> 
+	<PriceListList>    
+		<Id>1</Id>
+	</PriceListList>
+	<PriceListDetails> 
+		<Id>1</Id>
+		<Status>0</Status>
+	</PriceListDetails>
+</PriceListDetails>
+
+2. Read xml with DataSet.ReadXml()
+3. Inspect the result
+
+Actual Results:
+The table does not holds all the rows
+
+Expected Results:
+Tble holds exact number of row as appears in xml
+
+How often does this happen? 
+Always
+
+Additional Information:
+The problem is in XmlDataReader.Process(): in case we read XML with same
+names for dataset and datatable - we threat reader at dataset position as
+it is at datatable position.
+
+It should be threated as a special case.
+Note : the solution should also be good for the following case : xml
+holding only one table with name equals to default dataset name, i.e. :
+
+<NewDataSet>
+   <Column1>1</Column1>
+   <Column2>2</Column2>
+</NewDataSet>