Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > XmlDataDocument from DataSet with Nested DataRelations

Thread Tools

XmlDataDocument from DataSet with Nested DataRelations

Posts: n/a
I have a DataSet with 3 tables, and two DataRelations

dsSubs.Tables[0].TableName = "Subscriptions"
dsSubs.Tables[1].TableName = "AccountManagers"

dsSubs.Tables[2].TableName = "NewsFeeds"

I marked the two DataRelations as Nested, by doing the following

dsSubs.Relations["AccountManagers_Subscriptions"].Nested = true
dsSubs.Relations["Subscriptions_NewsFeeds"].Nested = true

This greatly improves the performance of XSL Transformations.

However, when I try to create an XmlDataDocument from the DataSet like this

XmlDataDocument oDoc = new XmlDataDocument(dsSubs)

I get the Object reference not set to an instance of an object. erro

If I comment out the lines which define the DataRelations as Nested, this doesn't occur

Anyone know why this is occuring

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
XMLDocument / XMLDataDocument + DataSet / XMLDatasource / Datasourcecontrol phl ASP .Net 1 02-02-2007 08:04 PM
XmlDataDocument error with DataSet relationships set Steve ASP .Net 0 02-29-2004 04:07 AM
referencing an XmlDataDocument in my web form DC Gringo ASP .Net Web Services 0 01-29-2004 12:10 AM
XMLDataDocument on a mobile form? prince -=nore=- ASP .Net Mobile 0 10-09-2003 04:00 AM
XMLDataDocument on a mobile form? prince -=nore=- ASP .Net Mobile 0 09-13-2003 03:11 AM