TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
magne.ryholt
NA
1
0
XML Schema and typed DataSet
Jun 28 2004 6:26 AM
Using Visual Studio 2003 Consider the following simple XML Schema:
As can be seen, the Child element must be within the Father element. Now I let VS make a typed DataSet out of this schema and using the following code to fill the tables: SystemModel model = new SystemModel(); SystemModel.FatherRow fatherRow = model.Father.NewFatherRow(); fatherRow.Name = "Father"; model.Father.AddFatherRow(fatherRow); SystemModel.ChildRow childRow = model.Child.NewChildRow(); childRow.Name = "Child"; // oops, "forgot to set the parent row // childRow.FatherRow = fatherRow; model.Child.AddChildRow(childRow); model.WriteXml(@"SystemModel.xml"); This produce the following XML file:
This cannot be validated against the schema which was used to produce the dataset, this because I "forgot" to set the parentrow in the childrow. Is it possible to change the schema to force VS to add the statement: columnFather_Id.AllowDBNull = false; ?? Also I would like some tips of how to make the schema (so that Typed DataSet may be made on it) containing an element which contains itself (this is possible by "pure" xsd and also in a database relational model, but I don't know how to make a typed DataSet out of it) Any tips are welcome !
Reply
Answers (
0
)
INNER JOIN on a DataSet
Query execution time