XmlDataDocument from DataSet with Nested DataRelations

Discussion in 'ASP .Net' started by =?Utf-8?B?R2VvcmdlIER1cnpp?=, May 12, 2004.

  1. 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
     
    =?Utf-8?B?R2VvcmdlIER1cnpp?=, May 12, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Steve
    Replies:
    0
    Views:
    718
    Steve
    Feb 29, 2004
  2. phl
    Replies:
    1
    Views:
    493
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
    Feb 2, 2007
  3. prince -=nore=-

    XMLDataDocument on a mobile form?

    prince -=nore=-, Sep 13, 2003, in forum: ASP .Net Mobile
    Replies:
    0
    Views:
    146
    prince -=nore=-
    Sep 13, 2003
  4. prince -=nore=-

    XMLDataDocument on a mobile form?

    prince -=nore=-, Oct 9, 2003, in forum: ASP .Net Mobile
    Replies:
    0
    Views:
    133
    prince -=nore=-
    Oct 9, 2003
  5. DC Gringo

    referencing an XmlDataDocument in my web form

    DC Gringo, Jan 29, 2004, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    118
    DC Gringo
    Jan 29, 2004
Loading...

Share This Page