Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XML Unique Constraint not appearing in dataset

Status
Not open for further replies.

Zarcom

Programmer
May 7, 2002
1,275
CA
Hello everyone. I am back after a long hiatus. Back in the industry and back here as well. Seems that there are a quite a few new faces though i do see some old friends.

I've got a datasource in xml and I'm pulling it into my web app using an xsd file to create the dataset.

My question is that a unique constraint in the xsd isn't being enforced. There is no reference of it in the dataset class code, and replicant data is allowed to be written to the datasource and read from the datasource.

I currently have this in the xsd.

<xs:key name=&quot;uk_UsersName&quot;>
<xs:selector xpath=&quot;.&quot; />
<xs:field xpath=&quot;mstns:UserName&quot; />
</xs:key>

I've also tried this one.

<xs:unique name=&quot;uk_UsersName&quot;>
<xs:selector xpath=&quot;.&quot; />
<xs:field xpath=&quot;mstns:UserName&quot; />
</xs:unique>


Any ideas

That'l do donkey, that'l do
[bravo] Mark
If you are unsure of forum etiquette check here faq796-2540
 
Get to DataSet View and in the properties view, Play with the field Collection of the ley Collection. That is how I got a two table MSDB related. If you mess up, Remove every field from a key collection entry to make the key disappear. That is the best I can offer because I have seen no doc on this, even in ADO .NET books.

Forms/Controls Resizing/Tabbing Control
Compare Code (Text)
Generate Sort Class in VB or VBScript
 
Zarc - welcome back - you know you are overdue when they have me listed in the top 5! I've been sharing quite a bit of cut and paste code, but mostly basic materials.

When the likes of you, jfrost, Paul, LV, Boulder and others, this forum becomes a very nice academic experience for a lot of us. I have also been impressed, with the contributions such as the one above from JohnYingling - that I think is what sets Tek-Tips somewhat apart from other sites -- there seems to be a very nice community of programmers that come by Tek-Tips.

Every interaction is a lesson of some sort here. You have already helped a ton of people Zarc - and it is great to see that all is well - I know many others like myself appreciate you being here.
 
And that goes too for Custom24, Crazy, and a host of other very academically capable people that take the time to help others.
 
As always Izzy you give me a warm and fuzzy feeling inside. ;-)

Not really sure what it was. I fixed the problem by deleting the xsd file completely and rebuilding it from scratch. Making sure to use only the visual designer and not even looking at the xml schema itself.

VS playing it's tricks again I guess I swear this IDE is chock full of demons and ghosts somtimes.

That'l do donkey, that'l do
[bravo] Mark
If you are unsure of forum etiquette check here faq796-2540
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top