473,394 Members | 1,944 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

XmlDataDocument from DataSet with Nested DataRelations

I have a DataSet with 3 tables, and two DataRelations

dsSubs.Tables[0].TableName = "Subscriptions"
dsSubs.Tables[1].TableName = "AccountManagers"
dsSubs.Relations.Add
"AccountManagers_Subscriptions",
dsSubs.Tables["AccountManagers"].Columns["UserId"]
dsSubs.Tables["Subscriptions"].Columns["UserId"])

dsSubs.Tables[2].TableName = "NewsFeeds"
dsSubs.Relations.Add
"Subscriptions_NewsFeeds"
dsSubs.Tables["Subscriptions"].Columns["SubscriptionId"]
dsSubs.Tables["NewsFeeds"].Columns["SubscriptionId"])

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

Nov 18 '05 #1
0 1427

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Eric Decker | last post by:
With framework 1.0 the dataset.getxml() method returned the children nested within the parent. This doesn't seem to function this way with 1.1. Is there something I'm missing?
2
by: kevin_Eld | last post by:
I have the following xml: <message> <envelope> <body key="" value="" /> </envelope> </message> I have associated an xsd to this xml in order to use the XmlDataDocument and give me the
1
by: Mathew Relick | last post by:
I'm relatively new to this sort of thing, so forgive me if this is completely off base, but I'm having a problem getting the XMLDataDocument to do what I need it to. I have a small test...
0
by: Mathew Relick | last post by:
I'm relatively new to this sort of thing, so forgive me if this is completely off base, but I'm having a problem getting the XMLDataDocument to do what I need it to. I have a small test...
2
by: James Ankrom | last post by:
Why does this fail? Dim relResources As New Data.DataRelation("Application_Resources", ..Tables("User_Applications").Columns("Application_id"),...
0
by: Steve | last post by:
I have a dataset. I fill it with two recordsets from SQL queries. Tables are called tblPlanFYSpendingStage, tblSpendingStage.
4
by: Adrian Meyer | last post by:
Hi, On the server I code the following web service: ))] public XmlDataDocument GetTypedXmlDataDocument() { sqlDataAdapter1.Fill(typedDataSet1); XmlDataDocument dataDoc
3
by: jmagaram | last post by:
I have a DataSet I want to work with as Xml using XmlDataDocument. I can't figure out how to query the resultant Xml using XPath. From the following XML below, what XPath query will return the list...
1
by: JD | last post by:
I have a DataGridView with a DataSet as DataSource. The user can update the contents of the DataGridView, and then click on a Save button to save the data to an XML file. When they click on...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.