Typed Dataset

  • Thread starter Thread starter Vlad
  • Start date Start date
V

Vlad

While creating a typed dataset I create some elements whose data type is a
SimpleType with enumeration facets. However when I enter data into that
field the dataset does not seem to enforce the enumeration constraint. In
other words, I could enter any data I want into the field instead of only
the data from the enumeration list.

Here is the framgment of the xml schema that was generated my VS.net 2003:

Am I doing anything wrong?

Help would really be appreciated!
......

<xs:element name="TimeKeepers">

<xs:complexType>

<xs:sequence>

<xs:element name="Id" type="xs:string" minOccurs="0" />

<xs:element name="Position" type="TKPositions" minOccurs="0" />

<xs:element name="Rate" type="xs:decimal" minOccurs="0" />

<xs:element name="is_attorney" type="xs:boolean" minOccurs="0" />

</xs:sequence>

</xs:complexType>

</xs:element>

<xs:simpleType name="TKPositions">

<xs:restriction base="xs:string">

<xs:enumeration value="Unspecified" />

<xs:enumeration value="Partner" />

<xs:enumeration value="Associate" />

<xs:enumeration value="OfCouncel" />

<xs:enumeration value="Paralegal" />

<xs:enumeration value="LegalAssistant" />

<xs:enumeration value="Secretary" />

<xs:enumeration value="Clerk" />

<xs:enumeration value="Other" />

</xs:restriction>

</xs:simpleType>

</xs:schema>
 
Back
Top