D
DotNet Ed
Ignore the previous post, this dumb OE sent my posting prematurely...
Anyway, the problem is I have an XML schema where I have specified that a
particular element is to be UNIQUE. This schema is read with the DataSet's
ReadXmlSchema() before reading the actual data with ReadXml().
I specified that that particular field is a Primary Key so I see something
like this:
<xs:complexType>...</xs:complexType>
<xs:key name="MyTableKey1" msdatarimaryKey="true">
<xs:selector xpath=".//mstns:MyTable" />
<xs:field xpath="mstns:Name" />
</xs:key>
within the complex type there is an <xs:element name="Name" type="string"
.... />
In the dataset I have also set that particular DataColumn as PrimaryKey.
The problem is... that I am able to inject several identical rows in the
data set, so even though the Name field/element is not unique no error is
produced... What am I missing here?
Regards,
Emilio
Anyway, the problem is I have an XML schema where I have specified that a
particular element is to be UNIQUE. This schema is read with the DataSet's
ReadXmlSchema() before reading the actual data with ReadXml().
I specified that that particular field is a Primary Key so I see something
like this:
<xs:complexType>...</xs:complexType>
<xs:key name="MyTableKey1" msdatarimaryKey="true">
<xs:selector xpath=".//mstns:MyTable" />
<xs:field xpath="mstns:Name" />
</xs:key>
within the complex type there is an <xs:element name="Name" type="string"
.... />
In the dataset I have also set that particular DataColumn as PrimaryKey.
The problem is... that I am able to inject several identical rows in the
data set, so even though the Name field/element is not unique no error is
produced... What am I missing here?
Regards,
Emilio