Click here to Skip to main content
14,430,374 members
Rate this:
Please Sign up or sign in to vote.
See more:
I would like to read a Xml feed from a website and store it in a SQL Table .
I was sucessful in reading and displaying the XML in specific format , but i was not able to feed it into a SQL table.


For example :

I have this XML link (RSS ) : http://www.nsf.gov/rss/rss_www_funding_upcoming_cise.xml

I created a SQL table with columns NAME,PUB_DATE,DESC .

How do i map the information to this table?

Also how to update the tables automatically when the Xml feed changes ?


This is my first post and also i know this community is very active.

I kindly request you guys to guide me through this.
I am using Visual Studio 2010.


<asp:DataGrid runat="server" ID="myPosts" AutoGenerateColumns="False">
           <columns>
               <asp:TemplateColumn HeaderText="My Posts">
                   <itemtemplate>
                       <a href="<%# DataBinder.Eval(Container.DataItem, " link=")%>">
                           <%# DataBinder.Eval(Container.DataItem, "title") %>
                       </a>
                   </itemtemplate>
           </columns>


code behind

XmlTextReader reader = new XmlTextReader("http://www.nsf.gov/rss/rss_www_funding_upcoming_cise.xml");

DataSet ds = new DataSet();

ds.ReadXml(reader);

myPosts.DataSource = ds;
myPosts.DataBind();


here i need to insert data to database table using ado.net....please help me
Posted
Updated 12-May-15 21:44pm
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100