471,570 Members | 998 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,570 software developers and data experts.

Type DataSet ReadXml problem

I have a typed dataset that was created with xsd tool from a schema. When I try to load an xml file into the dataset I get a constraint error. The error is cause by the very first attribute on the opening element of the document. This element is required so there is a not null constraint in the data set, as there should be. The problem is, the attribute is not null in the document. It has an integer value like the schema says it should.

<element requiredattribute="1" anotherattribute="" anotherattribute1="50"><element attribute=""/><!-- bunch of other stuff --></element

I have validated the document with the schema that created the typed dataset using XmlSpy and the ValidatingReader. Both say the file is valid. The code for this table has the right name and mapping type “MappingType.Attribute”.

If I catch this in the rowchanged event for this table, the value shows as being DBNull. I can fix it in the event handler and the dataset loads fine, so this seems to be the only problem

What’s the deal

Derek

Nov 12 '05 #1
0 1805

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Jeffrey A. Voigt | last post: by
1 post views Thread by mr_dom_is | last post: by
4 posts views Thread by Shapper | last post: by
4 posts views Thread by J.C.Rivera | last post: by
reply views Thread by XIAOLAOHU | last post: by
reply views Thread by leo001 | last post: by
reply views Thread by lumer26 | last post: by
reply views Thread by lumer26 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.