I would like to create a RSS feed from my Access Database.
I have an Access table for news which has the article title, date, and
story in it. What I would like to do is pull the data from there into an
xml file to create the RSS feed, so when users upload a news story it
automatically updates in the xml file. Can this be done with asp? and where
should I look for more information. Thanks, This is a great group.
--
Posted via a free Usenet account from http://www.teranews.com
<%
rs_blog_feed.Close()
Set rs_blog_feed = Nothing
%>
On Apr 25, 12:10 pm, Billy Barth wrote:
> I would like to create a RSS feed from my Access Database.
> I have an Access table for news which has the article title, date, and
> story in it. What I would like to do is pull the data from there into an
> xml file to create the RSS feed, so when users upload a news story it
> automatically updates in the xml file. Can this be done with asp? and where
> should I look for more information. Thanks, This is a great group.
>
> --
> Posted via a free Usenet account fromhttp://www.teranews.com
Re: Create Rss feed from data in database
am 26.04.2007 15:56:28 von Mike Brind
"Billy Barth" wrote in message
news:Xns991D84DF985CCbjbarthgmailcom@66.150.105.47...
>I would like to create a RSS feed from my Access Database.
> I have an Access table for news which has the article title, date, and
> story in it. What I would like to do is pull the data from there into an
> xml file to create the RSS feed, so when users upload a news story it
> automatically updates in the xml file. Can this be done with asp? and
> where
> should I look for more information. Thanks, This is a great group.
>
Was used to pull all stories entered within the last 30 days. Obviously you
can alter the date range, regional settings (eg language, date format, time)
and links according to your needs. The result validates against RSS 2.0.
<%
function tidyxml(text)
text = replace(text,Chr(180),"'")
text = replace(text,"&","&")
text = replace(text,"'","'")
text = replace(text,"'","'")
text = replace(text,""","""")
text = replace(text,""","""")
text = replace(text," ","")
text = replace(text,"-","-")
text = replace(text,"<","<")
text = replace(text,">",">")
tidyxml = text
End function
thedate = Month(CurrDate) & "/" & Day(CurrDate) & "/" & Year(CurrDate)
if Month(CurrDate) = 1 then
thepreviousdate = "12/" & Day(CurrDate) & "/" & (Year(CurrDate)-1)
else
thepreviousdate = (Month(CurrDate)-1) & "/" & Day(CurrDate) & "/" &
Year(CurrDate)
end if
newsSQL = "SELECT StoryID,Headline, Description, DateEntered FROM Stories "
& _
WHERE DateEntered BETWEEN " & _
"#" & thedate & " 23:59:59# And #" & thepreviousdate & " 0:0:1#;"
set conn = server.createobject("ADODB.Connection")
conn.Open connectionstring
set rsNews = conn.execute(newsSQL)
If Not rs.EOF Then
arrNews = rsNews.GetRows()
rsNews.close : set rsNews = nothing
conn.close : set conn = nothing
filename = "rss/rss.xml"
set fso = createobject("scripting.filesystemobject")
set xmlfile = fso.createtextfile(server.mappath(filename),true)
"Mike Brind" wrote in
news:u85DyqAiHHA.4676@TK2MSFTNGP02.phx.gbl:
>
> "Billy Barth" wrote in message
> news:Xns991D84DF985CCbjbarthgmailcom@66.150.105.47...
>>I would like to create a RSS feed from my Access Database.
>> I have an Access table for news which has the article title, date,
>> and story in it. What I would like to do is pull the data from there
>> into an xml file to create the RSS feed, so when users upload a news
>> story it automatically updates in the xml file. Can this be done with
>> asp? and where
>> should I look for more information. Thanks, This is a great group.
>>
>
> Was used to pull all stories entered within the last 30 days.
> Obviously you can alter the date range, regional settings (eg
> language, date format, time) and links according to your needs. The
> result validates against RSS 2.0.
>
> <%
> function tidyxml(text)
> text = replace(text,Chr(180),"'")
> text = replace(text,"&","&")
> text = replace(text,"'","'")
> text = replace(text,"'","'")
> text = replace(text,""","""")
> text = replace(text,""","""")
>
>
Thanks!
--
Posted via a free Usenet account from http://www.teranews.com
Re: Create Rss feed from data in database
am 12.05.2007 12:49:59 von Ave
On Apr 25, 6:10 pm, Billy Barth wrote:
> I would like to create a RSS feed from my Access Database.
> I have an Access table for news which has the article title, date, and
> story in it. What I would like to do is pull the data from there into an
> xml file to create the RSS feed, so when users upload a news story it
> automatically updates in the xml file. Can this be done with asp? and where
> should I look for more information. Thanks, This is a great group.
I have created a class in ASP that enables you to easily create Atom
feeds:
http://www.codercow.com/AtomXML/
It is not a complete implementation of the Atom standard, since I
doubt most people find it relevant to include ie. 2 different sizes of
images etc. But it is easy to extend to suit your needs.
Most people just use it out of the box.
Others have posted the necessary code to retrieve and run through a
recordset, all you have to do is call the method AddEntry for each
record.