RSS feeds:A column named 'link' already belongs to this DataTable: cannot set a nested table name to the same name.

Posted on 2011-05-01
Last Modified: 2012-06-27

I am trying to consume RSS feeds from different sites.
With the same code some are working and others are failing.
A column named 'link' already belongs to this DataTable: cannot set a nested table name to the same name.

How to fix this issue?

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        gdv_RSS.DataSource = GetRSsFeeds()

    End Sub

    Private Function GetRSsFeeds() As DataTable

        Dim xmlRead As New XmlTextReader(myurl)
        Dim ds As New DataSet
        Return ds.Tables(3)

    End Function

Open in new window

Question by:rowternet
    LVL 42

    Accepted Solution

    The problem occurs when the XML feed contains a structure that is incompatible with a datatables.  For example:

      <link>                   <--an ordinary column
          <link>     <--an embedded table
          <link>     <--an embedded table



    Unfortunately, I don't know a workaround.  I checked the web and you may get better results with net 1.0

    Author Closing Comment


    Featured Post

    Training Course: Java/J2EE and SOA

    This course will cover both core and advanced Java concepts like Database connectivity, Threads, Exception Handling, Collections, JSP, Servlets, XMLHandling, and more. You'll also learn various Java frameworks like Hibernate and Spring.

    Join & Write a Comment

    Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
    Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (…
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…
    This video discusses moving either the default database or any database to a new volume.

    731 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now