I love typed datasets. I love XSD's. Import them into your project and .NET will generate a beautifull class for you. Usually importing datasets is a no-bump matter but there is something wrong with this schema :
<?
xml version="1.0" encoding="utf-8" ?>
<xs:schema id="DataSet1" targetNamespace=http://www.testgekko/pp/DataSet1.xsd
xmlns:mstns=http://www.testgekko/pp/DataSet1.xsd
xmlns=http://www.testgekko/pp/DataSet1.xsd
xmlns:xs=http://www.w3.org/2001/XMLSchema
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"
attributeFormDefault="qualified"
elementFormDefault="qualified">
<xs:element name="DataSet1" msdata:IsDataSet="true" msdata:Locale="nl-NL">
<xs:complexType>
<xs:choice maxOccurs="unbounded">
<xs:element name="Categories">
<xs:complexType>
<xs:sequence>
<xs:element name="CategoryID" msdata:ReadOnly="true" msdata:AutoIncrement="true" type="xs:int" />
<xs:element name="CategoryName" type="xs:string" />
<xs:element name="Description" type="xs:string" minOccurs="0" />
<xs:element name="Picture" type="xs:base64Binary" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
<xs:unique name="Constraint1" msdata:PrimaryKey="true">
<xs:selector xpath=".//mstns:Categories" />
<xs:field xpath="mstns:CategoryID" />
</xs:unique>
</xs:element>
</xs:schema>
XSD parses the schema without complaining. The app builds. But there are no classes generated. So you can't use the dataset. I've been staring over and over again but I just don't understand what's wrong with the schema. Anybody got a clue ?
Peter
Update : the schema is OK, it is VS: http://dotnetjunkies.com/WebLog/petergekko/archive/2004/03/10/8766.aspx
Posted
Tue, Mar 9 2004 6:41 PM
by
pvanooijen