469,268 Members | 961 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,268 developers. It's quick & easy.

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 1749

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 zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.