[Mono-bugs] [Bug 75121][Nor] New - DataSet xml schema does not
reflect AutoIncrementSeed value for AutoIncrement columns
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Thu Jun 2 10:27:08 EDT 2005
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 george.barbarosie at gmail.com.
http://bugzilla.ximian.com/show_bug.cgi?id=75121
--- shadow/75121 2005-06-02 10:27:08.000000000 -0400
+++ shadow/75121.tmp.11019 2005-06-02 10:27:08.000000000 -0400
@@ -0,0 +1,103 @@
+Bug#: 75121
+Product: Mono: Class Libraries
+Version: 1.1
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: Sys.Data
+AssignedTo: mono-bugs at ximian.com
+ReportedBy: george.barbarosie at gmail.com
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: DataSet xml schema does not reflect AutoIncrementSeed value for AutoIncrement columns
+
+On mcs from svn trunk (tested on rev45324), in XML Schema for datasets
+autoincrement column elements don't have the msdata:AutoIncrementStep
+attribute set.
+
+Sample code:
+
+using System;
+using System.Data;
+
+class Test {
+ public static void Main() {
+ DataSet ds = new DataSet("testds");
+ DataTable tbl = ds.Tables.Add("testtbl");
+ DataColumn col = tbl.Columns.Add("id", typeof(int));
+ col.AutoIncrement = true;
+ col.AutoIncrementSeed = -1;
+ col.AutoIncrementStep = -1;
+ tbl.Columns.Add("data", typeof(string));
+
+ Console.WriteLine(ds.GetXmlSchema());
+ }
+}
+
+Expected result (.NET, WinXP):
+
+<?xml version="1.0" encoding="utf-16"?>
+
+<xs:schema id="testds" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema"
+xmln
+
+s:msdata="urn:schemas-microsoft-com:xml-msdata">
+
+ <xs:element name="testds" msdata:IsDataSet="true" msdata:Locale="ro-RO">
+
+ <xs:complexType>
+
+ <xs:choice maxOccurs="unbounded">
+
+ <xs:element name="testtbl">
+
+ <xs:complexType>
+
+ <xs:sequence>
+ <xs:element name="id" msdata:AutoIncrement="true"
+msdata:AutoIncre
+
+mentSeed="-1" msdata:AutoIncrementStep="-1" type="xs:int" minOccurs="0" />
+
+ <xs:element name="data" type="xs:string" minOccurs="0" />
+
+ </xs:sequence>
+
+ </xs:complexType>
+
+ </xs:element>
+
+ </xs:choice>
+
+ </xs:complexType>
+
+ </xs:element>
+
+</xs:schema>
+
+Acutal result:
+
+<?xml version="1.0" encoding="utf-16"?>
+<xs:schema id="testds" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema"
+xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xs:element name="testds" msdata:IsDataSet="true" msdata:Locale="">
+ <xs:complexType>
+ <xs:choice maxOccurs="unbounded">
+ <xs:element name="testtbl">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="id" msdata:AutoIncrement="true"
+msdata:AutoIncrementSeed="-1" type="xs:int" minOccurs="0" />
+ <xs:element name="data" type="xs:string" minOccurs="0" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:choice>
+ </xs:complexType>
+ </xs:element>
+</xs:schema>
More information about the mono-bugs
mailing list