J
jack
using the following xsd code :
<xs:element name="tblUsers">
<xs:complexType>
<xs:sequence>
<xs:element name="UserID" type="xs:int" />
<xs:element name="FullName" type="xs:string" />
<xs:element name="UserName" type="xs:string" />
<xs:element name="Password" type="xs:string" />
<xs:element name="Email" type="xs:string" />
</xs:sequence>
</xs:complexType>
<xs:unique name="tblUsersKey1" msdatarimaryKey="true">
<xs:selector xpath="." />
<xs:field xpath="mstns:UserID" />
</xs:unique>
</xs:element>
i'm unable to execute this against a dataset loaded with the schema and a
sample xml data file.
theRow = systemDB.Tables["tblUsers"].Rows.Find(theUser.UserID);
Exception Details: System.Data.MissingPrimaryKeyException: Table doesn't
have a primary key.
what am i missing?
<xs:element name="tblUsers">
<xs:complexType>
<xs:sequence>
<xs:element name="UserID" type="xs:int" />
<xs:element name="FullName" type="xs:string" />
<xs:element name="UserName" type="xs:string" />
<xs:element name="Password" type="xs:string" />
<xs:element name="Email" type="xs:string" />
</xs:sequence>
</xs:complexType>
<xs:unique name="tblUsersKey1" msdatarimaryKey="true">
<xs:selector xpath="." />
<xs:field xpath="mstns:UserID" />
</xs:unique>
</xs:element>
i'm unable to execute this against a dataset loaded with the schema and a
sample xml data file.
theRow = systemDB.Tables["tblUsers"].Rows.Find(theUser.UserID);
Exception Details: System.Data.MissingPrimaryKeyException: Table doesn't
have a primary key.
what am i missing?