Save RSS feed into Access DB

i parse rss feeds from another websites in my asp page... all is well, but is there away to save the rss feed in my access database?
DoomishAsked:
Who is Participating?
 
eyeh8uCommented:
Do you want to save the raw RSS data, or the parsed result?

Saving the raw data is easy, assuming an access database with one table RSSfeeds with an autonumber id field and a text field called rssdata.

<%@ LANGUAGE = VBScript%>
<%
Option Explicit

' ADO
Dim objConn, objComm, objRS, strSQL, strConnectionString, strRSSData

strRSSData = loadrssfeed("http://www.somesite.com/feed.rss")

strConnectionString = "driver={Microsoft Access Driver (*.mdb)};DBQ=" & Server.Mappath("../path/to/mdb") & ";"
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open strConnectionString
Set objComm = Server.CreateObject("ADODB.Command")
objComm.ActiveConnection = objConn
Set objRS = Server.CreateObject("ADODB.Recordset")

strSQL = "SELECT id, rssdata FROM rssfeeds WHERE id=-1"
objComm.CommandText = strSQL
objRS.Open objComm,,0,3
objRS.AddNew
objRS("rssdata") = strRSSData
objRS.Update
objRS.Close

Set objRS = Nothing
Set objComm = Nothing
Set objConn = Nothing
%>

If you are wanting to store the parsed results, it's the same thing really, but for each article in the feed you'd do an addNew and set objRS("title") = strArticleTitle etc before the update.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.