Create RSS-feed From Access Database

i have a access db
ID:
PracticeName:
PCT:
Practice_Telephone_Number:
Contact_Name:
Direct_Line_Number:
Fax_Number:
email_address:
Surgery_Address_including_Postcode:
Brief_description_of_Pratice:
Number_of_Patients:
Number_of_GPs:
Practice_Computer_System:
description_of_Post:
Timestamp:
Remote_computer_name:
User_name:
Browser_type:
Timestamp1:


what is the best way to get top 8 in to a rss feed...... not a asp.net
LVL 31
James MurrellProduct SpecialistAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Britt ThompsonSr. Systems EngineerCommented:
So you're trying to create the RSS XML without using ASP? If you're using PHP is it on a Linux server? If you're using Linux you can get the ODBC drivers to connect to the database here: http://www.openlinksw.com/

If you're using a Windows web server you just need to create the ODBC connection for the PHP to read the Access database and generate the XML for the feed. This page explains how:
http://www.ibm.com/developerworks/library/x-phprss/

Here's an example of the generated XML file:
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>Your RSS Feed</title>
    <link>http://feedlink.com</link>
    <description>Practices</description>
    <language>en-us</language>
    <pubDate>Tue, 10 Jun 2009 04:00:00 GMT</pubDate>
    <lastBuildDate>Tue, 10 Jun 2009 09:41:01 GMT</lastBuildDate>
  
    <item>
      <title>Practice Name</title>
      <link>http://linkifany.com</link>
      <description>
	 	ID:
		PracticeName:
		PCT:
		Practice_Telephone_Number:
		Contact_Name:
		Direct_Line_Number:
		Fax_Number:
		email_address:
	  </description>
      <pubDate>Tue, 03 Jun 2009 09:39:21 GMT</pubDate>
    </item>
  </channel>
</rss>

Open in new window

0
James MurrellProduct SpecialistAuthor Commented:
with asp is ok but not asp.net... it is a windows iis 6 server
0
Britt ThompsonSr. Systems EngineerCommented:
I'm not an asp guy but the same format above applies. The article explains how to query the database using ASP and you'll need to write the code that echos out the content of the XML for the feed.

http://www.haneng.com/lessons_17.asp
0
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

James MurrellProduct SpecialistAuthor Commented:
i havew manage to get this far

but nothing appears


<?xml version="1.0" encoding="ISO-8859-1"?>
<% Response.Buffer = true
   Response.ContentType = "text/xml"
   
Function ApplyXMLFormatting(strInput)
  strInput = Replace(strInput,"&", "&amp;")
  strInput = Replace(strInput,"'", "'")
  strInput = Replace(strInput,"""", "&quot;")
  strInput = Replace(strInput, ">", "&gt;")
  strInput = Replace(strInput,"<","&lt;")
  
  ApplyXMLFormatting = strInput
End Function   
    %>
 
<rss version="2.0">
  <channel>
    <title>Recent Posts on xxxxxxxxx.com</title>
    <link>http://www.xxxxxxxxxxx.com/</link>
    <description>xxx.com is a site wxxxxxxxxxxxxxxs!</description>
    <language>en-us</language>
    <copyright>Copyright x. 
       All Rights Reserved.</copyright>
    <lastBuildDate><%=Now()%></lastBuildDate>
    <ttl>20</ttl>
<%
  'Dim objConn
 Set objConn = Server.CreateObject("ADODB.Connection")
  'objConn.ConnectionString = Application("practice_registration.mdb")
  objConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
Server.MapPath ("practice_registration.mdb") & ";"
 objConn.Open
    
  Dim objRS, strSQL, strDesc 
  strSQL ="SELECT Results.PracticeName, Results.Practice_Telephone_Number, Results.description_of_Post, Results.Timestamp FROM Results;"
  Set objRS = objConn.Execute(strSQL)  
 
  Do While Not objRS.EOF
    strDesc = "<b>Message by " & objRS("PracticeName") & " on " & _
             objRS("Timestamp") & " EST</b><br>" & _
             objRS("description_of_Post").Value %>
    <item>
      <title><%=ApplyXMLFormatting(objRS("PracticeName").Value)%> 
         (<%=ApplyXMLFormatting(objRS("Timestamp").Value)%>)
      </title>
      <link>http://www.xxxxxxx.com/forum/showMessage.asp?F=
           <%=objRS("ForumID")%>&amp;P=1&amp;M=<%=objRS("MsgID")%></link><description><%=ApplyXMLFormatting(strDesc)%></description><datePosted><%=ApplyXMLFormatting(objRS("Timestamp"))%></datePosted></item><%
    objRS.MoveNext
  Loop
  
  objRS.Close
  Set objRS = Nothing
 
  objConn.Close
  Set objRS = Nothing
  Set objConn = Nothing
%></channel></rss>

Open in new window

0
Britt ThompsonSr. Systems EngineerCommented:
Are you getting any kind of errors?
0
Britt ThompsonSr. Systems EngineerCommented:
Somebody with a heavier background in this should be able to help you from here.
0
James MurrellProduct SpecialistAuthor Commented:
no errors just  as below and they is 25 records in the db

My Page

RSS content is displayed below:


--------------------------------------------------------------------------------
http://www.xxxxxxxxxxx.com/ xxxxxxx.com is xxxxxxxxx! en-us Copyright 200xxxxxxxx. All Rights Reserved. 12/07/2009 19:26:06 20
0
kevp75Commented:
change:
strSQL ="SELECT Results.PracticeName, Results.Practice_Telephone_Number, Results.description_of_Post, Results.Timestamp FROM Results;"


to:
strSQL ="SELECT TOP 8 Results.PracticeName, Results.Practice_Telephone_Number, Results.description_of_Post, Results.Timestamp FROM Results;"
0
James MurrellProduct SpecialistAuthor Commented:
My Page

RSS content is displayed below:


--------------------------------------------------------------------------------
http://www.xxxxxxxxxxx.com/ xxxxxxx.com is xxxxxxxxx! en-us Copyright 200xxxxxxxx. All Rights Reserved. 12/07/2009 19:42:24 20
0
James MurrellProduct SpecialistAuthor Commented:
forgot to add : still the same....

0
kevp75Commented:
can you send us a real link to it?  Did you try what I posted to limit them?
0
James MurrellProduct SpecialistAuthor Commented:
0
kevp75Commented:
Try this, exactly how it is posted here (with the exception of adding the forumID, and messageID to your query):


<%
Response.Buffer = true
Response.ContentType = "text/xml"
Write("<rss version=""2.0"">" & VbCrLf)
Write("<channel>" & VBCrLf)
Write("	<title>Recent Posts on xxxxxxxxx.com</title>" & VBCrLf)
Write("	<link>http://www.xxxxxxxxxxx.com/</link>" & VBCrLf)
Write("	<description>xxx.com is a site wxxxxxxxxxxxxxxs!</description>" & VBCrLf)
Write("	<language>en-us</language>" & VBCrLf)
Write("	<copyright>Copyright x. All Rights Reserved.</copyright>" & VBCrLf)
Write("	<lastBuildDate><%=Now()%></lastBuildDate>" & VBCrLf)
Write("	<ttl>20</ttl>" & VBCrLf)
Dim objConn, objRS, strSQL, strDesc
'objConn.ConnectionString = Application("practice_registration.mdb")
Set objConn = Server.CreateObject("ADODB.Connection")
	objConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath ("practice_registration.mdb") & ";"
	objConn.Open
		strSQL ="SELECT Top 8 PracticeName, Practice_Telephone_Number, description_of_Post, Timestamp, forumID, messageID FROM Results" 'get the message and forum ID in this...
		Set objRS = objConn.Execute(strSQL) 
			If Not(objRS.Eof) Then
				tmpArr = objRS.GetRows()
			End If
		Set objRS = Nothing 
	objConn.Close
Set objConn = Nothing
If IsArray(tmpArr) Then
	For i = 0 To UBound(tmpArr)
		Write("	<item>" & VbCrLf)
		Write("		<guid isPermaLink=""false"">MESSAGE_" & tmpArr(5, i) & "</guid>" & VbCrLf)
		Write("		<title>" & ApplyXMLFormatting(tmpArr(0, i)) & " (" & ApplyXMLFormatting(tmpArr(3, i)) & ")</title>" & VbCrLf)
		Write("		<link>http://www.xxxxxxx.com/forum/showMessage.asp?F=" & tmpArr(4, i) & "&amp;M=" & tmpArr(5, i) & "</link>" & VbCrLf)
		Write("			<description>" & VbCrLf)
		Write("				<![CDATA[" & VbCrLf)
		Write("					<strong>Message by " & tmpArr(0, i) & " on " & tmpArr(3, i) & " EST</strong><br />" & tmpArr(2, i) & VbCrLf)
		Write("				]]>" & VbCrLf)
		Write("			</description>" & VbCrLf)
		Write("			<pubDate>" & tmpArr(2, i) & "</pubDate>" & VbCrLf)
		Write("	</item>" & VbCrLf)
	Next : i = Null
	Erase tmpArr
End If
Write("</channel>" & VbCrLf)
Function ApplyXMLFormatting(ByVal strInput)
	strInput = Replace(strInput,"&", "&amp;")
	strInput = Replace(strInput,"'", "'")
	strInput = Replace(strInput,"""", "&quot;")
	strInput = Replace(strInput, ">", "&gt;")
	strInput = Replace(strInput,"<","&lt;")
	ApplyXMLFormatting = strInput
End Function   
Sub Write(ByVal strString)
	Response.Write(strString)
End Sub
%>

Open in new window

0
James MurrellProduct SpecialistAuthor Commented:
Microsoft VBScript compilation error '800a0409'

Unterminated string constant

/RSS2HTML.asp, line 11

Write(" <%=Now()
-------------------------------^
0
kevp75Commented:
p.s.   Your first link, is invalid because it is not an XML only document

your second link is not valid because it contains an error:

Invalid use of Null: 'Replace'
/RSS2HTML.asp, line 6

try what I posted, including the changes I suggested
0
kevp75Commented:
Ok...change that line to:

Write(" <lastBuildDate>" & Now() & "</lastBuildDate>" & VBCrLf)
0
kevp75Commented:
also, I believe it's supposed to be <pubDate></pubDate> and not <lastBuildDate></lastBuildDate>
0
kevp75Commented:
aye...   it is... try this:


<%
Response.Buffer = true
Response.ContentType = "text/xml"
Write("<rss version=""2.0"">" & VbCrLf)
Write("<channel>" & VBCrLf)
Write("	<title>Recent Posts on xxxxxxxxx.com</title>" & VBCrLf)
Write("	<link>http://www.xxxxxxxxxxx.com/</link>" & VBCrLf)
Write("	<description>xxx.com is a site wxxxxxxxxxxxxxxs!</description>" & VBCrLf)
Write("	<language>en-us</language>" & VBCrLf)
Write("	<copyright>Copyright x. All Rights Reserved.</copyright>" & VBCrLf)
Write("	<pubDate>" & Now() & "</pubDate>" & VBCrLf)
Write("	<ttl>20</ttl>" & VBCrLf)
Dim objConn, objRS, strSQL, strDesc
'objConn.ConnectionString = Application("practice_registration.mdb")
Set objConn = Server.CreateObject("ADODB.Connection")
	objConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath ("practice_registration.mdb") & ";"
	objConn.Open
		strSQL ="SELECT Top 8 PracticeName, Practice_Telephone_Number, description_of_Post, Timestamp, forumID, messageID FROM Results" 'get the message and forum ID in this...
		Set objRS = objConn.Execute(strSQL) 
			If Not(objRS.Eof) Then
				tmpArr = objRS.GetRows()
			End If
		Set objRS = Nothing 
	objConn.Close
Set objConn = Nothing
If IsArray(tmpArr) Then
	For i = 0 To UBound(tmpArr)
		Write("	<item>" & VbCrLf)
		Write("		<guid isPermaLink=""false"">MESSAGE_" & tmpArr(5, i) & "</guid>" & VbCrLf)
		Write("		<title>" & ApplyXMLFormatting(tmpArr(0, i)) & " (" & ApplyXMLFormatting(tmpArr(3, i)) & ")</title>" & VbCrLf)
		Write("		<link>http://www.xxxxxxx.com/forum/showMessage.asp?F=" & tmpArr(4, i) & "&amp;M=" & tmpArr(5, i) & "</link>" & VbCrLf)
		Write("			<description>" & VbCrLf)
		Write("				<![CDATA[" & VbCrLf)
		Write("					<strong>Message by " & tmpArr(0, i) & " on " & tmpArr(3, i) & " EST</strong><br />" & tmpArr(2, i) & VbCrLf)
		Write("				]]>" & VbCrLf)
		Write("			</description>" & VbCrLf)
		Write("			<pubDate>" & tmpArr(2, i) & "</pubDate>" & VbCrLf)
		Write("	</item>" & VbCrLf)
	Next : i = Null
	Erase tmpArr
End If
Write("</channel>" & VbCrLf)
Function ApplyXMLFormatting(ByVal strInput)
	strInput = Replace(strInput,"&", "&amp;")
	strInput = Replace(strInput,"'", "'")
	strInput = Replace(strInput,"""", "&quot;")
	strInput = Replace(strInput, ">", "&gt;")
	strInput = Replace(strInput,"<","&lt;")
	ApplyXMLFormatting = strInput
End Function   
Sub Write(ByVal strString)
	Response.Write(strString)
End Sub
%>

Open in new window

0
James MurrellProduct SpecialistAuthor Commented:
using above code

This page contains the following errors:

error on line 10 at column 17: AttValue: " or ' expected
Below is a rendering of the page up to the first error.

Recent Posts on xxxxxxxxx.com http://www.xxxxxxxxxxx.com/ xxx.com is a site wxxxxxxxxxxxxxxs! en-us Copyright x. All Rights Reserved. 12/07/2009 20:40:35 20
0
kevp75Commented:
on what link?
0
kevp75Commented:
I'm now getting this error on the second link:

No value given for one or more required parameters.

post your code as it is now
0
James MurrellProduct SpecialistAuthor Commented:
as you posted
<%
Response.Buffer = true
Response.ContentType = "text/xml"
Write("<rss version=""2.0"">" & VbCrLf)
Write("<channel>" & VBCrLf)
Write(" <title>Recent Posts on xxxxxxxxx.com</title>" & VBCrLf)
Write(" <link>http://www.xxxxxxxxxxx.com/</link>" & VBCrLf)
Write(" <description>xxx.com is a site wxxxxxxxxxxxxxxs!</description>" & VBCrLf)
Write(" <language>en-us</language>" & VBCrLf)
Write(" <copyright>Copyright x. All Rights Reserved.</copyright>" & VBCrLf)
Write(" <pubDate>" & Now() & "</pubDate>" & VBCrLf)
Write(" <ttl>20</ttl>" & VBCrLf)
Dim objConn, objRS, strSQL, strDesc
'objConn.ConnectionString = Application("practice_registration.mdb")
Set objConn = Server.CreateObject("ADODB.Connection")
        objConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath ("practice_registration.mdb") & ";"
        objConn.Open
                strSQL ="SELECT Top 8 PracticeName, Practice_Telephone_Number, description_of_Post, Timestamp, forumID, messageID FROM Results" 'get the message and forum ID in this...
                Set objRS = objConn.Execute(strSQL) 
                        If Not(objRS.Eof) Then
                                tmpArr = objRS.GetRows()
                        End If
                Set objRS = Nothing 
        objConn.Close
Set objConn = Nothing
If IsArray(tmpArr) Then
        For i = 0 To UBound(tmpArr)
                Write(" <item>" & VbCrLf)
                Write("         <guid isPermaLink=""false"">MESSAGE_" & tmpArr(5, i) & "</guid>" & VbCrLf)
                Write("         <title>" & ApplyXMLFormatting(tmpArr(0, i)) & " (" & ApplyXMLFormatting(tmpArr(3, i)) & ")</title>" & VbCrLf)
                Write("         <link>http://www.xxxxxxx.com/forum/showMessage.asp?F=" & tmpArr(4, i) & "&amp;M=" & tmpArr(5, i) & "</link>" & VbCrLf)
                Write("                 <description>" & VbCrLf)
                Write("                         <![CDATA[" & VbCrLf)
                Write("                                 <strong>Message by " & tmpArr(0, i) & " on " & tmpArr(3, i) & " EST</strong><br />" & tmpArr(2, i) & VbCrLf)
                Write("                         ]]>" & VbCrLf)
                Write("                 </description>" & VbCrLf)
                Write("                 <pubDate>" & tmpArr(2, i) & "</pubDate>" & VbCrLf)
                Write(" </item>" & VbCrLf)
        Next : i = Null
        Erase tmpArr
End If
Write("</channel>" & VbCrLf)
Function ApplyXMLFormatting(ByVal strInput)
        strInput = Replace(strInput,"&", "&amp;")
        strInput = Replace(strInput,"'", "'")
        strInput = Replace(strInput,"""", "&quot;")
        strInput = Replace(strInput, ">", "&gt;")
        strInput = Replace(strInput,"<","&lt;")
        ApplyXMLFormatting = strInput
End Function   
Sub Write(ByVal strString)
        Response.Write(strString)
End Sub
%>

Open in new window

0
kevp75Commented:
Line 18...  did you do as I asked?

strSQL ="SELECT Top 8 PracticeName, Practice_Telephone_Number, description_of_Post, Timestamp, forumID, messageID FROM Results" 'get the message and forum ID in this...



change forumID, and messageID to what they are in the table Results
0
kevp75Commented:
post the structure for Resultsis that the structure for the table 'Results' in your main question?
0
1500Commented:
I have no idea what to do here.  I just need to open a QRP file.  I see no help here.

1500
0
kevp75Commented:
Try this on for size:


<%
Response.Buffer = true
Response.ContentType = "text/xml"
Write("<rss version=""2.0"">" & VbCrLf)
Write("<channel>" & VBCrLf)
Write("	<title>Recent Posts on xxxxxxxxx.com</title>" & VBCrLf)
Write("	<link>http://www.xxxxxxxxxxx.com/</link>" & VBCrLf)
Write("	<description>xxx.com is a site wxxxxxxxxxxxxxxs!</description>" & VBCrLf)
Write("	<language>en-us</language>" & VBCrLf)
Write("	<copyright>Copyright x. All Rights Reserved.</copyright>" & VBCrLf)
Write("	<pubDate>" & Now() & "</pubDate>" & VBCrLf)
Write("	<ttl>20</ttl>" & VBCrLf)
Dim objConn, objRS, strSQL, strDesc
'objConn.ConnectionString = Application("practice_registration.mdb")
Set objConn = Server.CreateObject("ADODB.Connection")
	objConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath ("practice_registration.mdb") & ";"
	objConn.Open
		strSQL ="SELECT Top 8 PracticeName, Practice_Telephone_Number, description_of_Post, Timestamp, ID FROM Results"
		Set objRS = objConn.Execute(strSQL) 
			If Not(objRS.Eof) Then
				tmpArr = objRS.GetRows()
			End If
		Set objRS = Nothing 
	objConn.Close
Set objConn = Nothing
If IsArray(tmpArr) Then
	For i = 0 To UBound(tmpArr)
		Write("	<item>" & VbCrLf)
		Write("		<guid isPermaLink=""false"">MESSAGE_" & tmpArr(5, i) & "</guid>" & VbCrLf)
		Write("		<title>" & ApplyXMLFormatting(tmpArr(0, i)) & " (" & ApplyXMLFormatting(tmpArr(3, i)) & ")</title>" & VbCrLf)
		Write("		<link>http://www.xxxxxxx.com/forum/showMessage.asp?M=" & tmpArr(4, i) & "</link>" & VbCrLf)
		Write("			<description>" & VbCrLf)
		Write("				<![CDATA[" & VbCrLf)
		Write("					<strong>Message by " & tmpArr(0, i) & " on " & tmpArr(3, i) & " EST</strong><br />" & tmpArr(2, i) & VbCrLf)
		Write("				]]>" & VbCrLf)
		Write("			</description>" & VbCrLf)
		Write("			<pubDate>" & tmpArr(2, i) & "</pubDate>" & VbCrLf)
		Write("	</item>" & VbCrLf)
	Next : i = Null
	Erase tmpArr
End If
Write("</channel>" & VbCrLf)
Function ApplyXMLFormatting(ByVal strInput)
	strInput = Replace(strInput,"&", "&amp;")
	strInput = Replace(strInput,"'", "'")
	strInput = Replace(strInput,"""", "&quot;")
	strInput = Replace(strInput, ">", "&gt;")
	strInput = Replace(strInput,"<","&lt;")
	ApplyXMLFormatting = strInput
End Function   
Sub Write(ByVal strString)
	Response.Write(strString)
End Sub
%>

Open in new window

0
kevp75Commented:
@1500....   what?
0
1500Commented:
I recieived an e-mail with a QRP file attached.  How do I open it?
0
James MurrellProduct SpecialistAuthor Commented:
whoops new code - same error


<%
Response.Buffer = true
Response.ContentType = "text/xml"
Write("<rss version=""2.0"">" & VbCrLf)
Write("<channel>" & VBCrLf)
Write(" <title>Recent Posts on xxxxxxxxx.com</title>" & VBCrLf)
Write(" <link>http://www.xxxxxxxxxxx.com/</link>" & VBCrLf)
Write(" <description>xxx.com is a site wxxxxxxxxxxxxxxs!</description>" & VBCrLf)
Write(" <language>en-us</language>" & VBCrLf)
Write(" <copyright>Copyright x. All Rights Reserved.</copyright>" & VBCrLf)
Write(" <pubDate>" & Now() & "</pubDate>" & VBCrLf)
Write(" <ttl>20</ttl>" & VBCrLf)
Dim objConn, objRS, strSQL, strDesc
'objConn.ConnectionString = Application("practice_registration.mdb")
Set objConn = Server.CreateObject("ADODB.Connection")
        objConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath ("practice_registration.mdb") & ";"
        objConn.Open
                strSQL ="SELECT Top 8 PracticeName, Practice_Telephone_Number, description_of_Post, Timestamp,PCT,  ID FROM Results" 'get the message and forum ID in this...
                Set objRS = objConn.Execute(strSQL) 
                        If Not(objRS.Eof) Then
                                tmpArr = objRS.GetRows()
                        End If
                Set objRS = Nothing 
        objConn.Close
Set objConn = Nothing
If IsArray(tmpArr) Then
        For i = 0 To UBound(tmpArr)
                Write(" <item>" & VbCrLf)
                Write("         <guid isPermaLink=""false"">MESSAGE_" & tmpArr(5, i) & "</guid>" & VbCrLf)
                Write("         <title>" & ApplyXMLFormatting(tmpArr(0, i)) & " (" & ApplyXMLFormatting(tmpArr(3, i)) & ")</title>" & VbCrLf)
                Write("         <link>http://www.xxxxxxx.com/forum/showMessage.asp?F=" & tmpArr(4, i) & "&amp;M=" & tmpArr(5, i) & "</link>" & VbCrLf)
                Write("                 <description>" & VbCrLf)
                Write("                         <![CDATA[" & VbCrLf)
                Write("                                 <strong>Message by " & tmpArr(0, i) & " on " & tmpArr(3, i) & " EST</strong><br />" & tmpArr(2, i) & VbCrLf)
                Write("                         ]]>" & VbCrLf)
                Write("                 </description>" & VbCrLf)
                Write("                 <pubDate>" & tmpArr(2, i) & "</pubDate>" & VbCrLf)
                Write(" </item>" & VbCrLf)
        Next : i = Null
        Erase tmpArr
End If
Write("</channel>" & VbCrLf)
Function ApplyXMLFormatting(ByVal strInput)
        strInput = Replace(strInput,"&", "&amp;")
        strInput = Replace(strInput,"'", "'")
        strInput = Replace(strInput,"""", "&quot;")
        strInput = Replace(strInput, ">", "&gt;")
        strInput = Replace(strInput,"<","&lt;")
        ApplyXMLFormatting = strInput
End Function   
Sub Write(ByVal strString)
        Response.Write(strString)
End Sub
%>

Open in new window

ee.txt
0
kevp75Commented:
can you upload an example database with some dummy data in it?

@1500...  ask in a new question.  Please do not invade somebody else's question.
0
James MurrellProduct SpecialistAuthor Commented:
0
kevp75Commented:
Ok.

The following code works @: http://manager.zipcm.com/temp.asp

please note...  change the path to your database

<%
Response.Buffer = true
Response.ContentType = "text/xml"
Write("<rss version=""2.0"">" & VbCrLf)
Write("	<channel>" & VBCrLf)
Write("		<title>Recent Posts on xxxxxxxxx.com</title>" & VBCrLf)
Write("		<link>http://www.xxxxxxxxxxx.com/</link>" & VBCrLf)
Write("		<description>xxx.com is a site wxxxxxxxxxxxxxxs!</description>" & VBCrLf)
Write("		<language>en-us</language>" & VBCrLf)
Write("		<copyright>Copyright x. All Rights Reserved.</copyright>" & VBCrLf)
Write("		<pubDate>" & Now() & "</pubDate>" & VBCrLf)
Write("		<ttl>20</ttl>" & VBCrLf)
Dim objConn, objRS, strSQL, strDesc
'objConn.ConnectionString = Application("practice_registration.mdb")
Set objConn = Server.CreateObject("ADODB.Connection")
	objConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath ("/practice_registration.mdb") & ";"
	objConn.Open
		strSQL ="SELECT Top 8 PracticeName, Practice_Telephone_Number, description_of_Post, Timestamp, ID, PCT FROM Results"
		Set objRS = objConn.Execute(strSQL) 
			If Not(objRS.Eof) Then
				tmpArr = objRS.GetRows()
			End If
		Set objRS = Nothing 
	objConn.Close
Set objConn = Nothing
If IsArray(tmpArr) Then
	For i = 0 To UBound(tmpArr)
		Write("		<item>" & VbCrLf)
		Write("			<guid isPermaLink=""false"">MESSAGE_" & tmpArr(4, i) & "</guid>" & VbCrLf)
		Write("			<title>" & ApplyXMLFormatting(tmpArr(0, i)) & " (" & ApplyXMLFormatting(tmpArr(3, i)) & ")</title>" & VbCrLf)
		Write("			<link>http://www.xxxxxxx.com/forum/showMessage.asp?M=" & tmpArr(4, i) & "&amp;F=" & ApplyXMLFormatting(tmpArr(5, i)) & "</link>" & VbCrLf)
		Write("			<description>" & VbCrLf)
		Write("				<![CDATA[" & VbCrLf)
		Write("					<strong>Message by " & tmpArr(0, i) & " on " & tmpArr(3, i) & " EST</strong><br />" & tmpArr(2, i) & VbCrLf)
		Write("				]]>" & VbCrLf)
		Write("			</description>" & VbCrLf)
		Write("			<pubDate>" & tmpArr(3, i) & "</pubDate>" & VbCrLf)
		Write("		</item>" & VbCrLf)
	Next : i = Null
	Erase tmpArr
End If
Write("	</channel>" & VbCrLf)
Write("</rss>" & VbCrLf)
Function ApplyXMLFormatting(ByVal strInput)
	If Not(IsNull(strInput)) Then
		ApplyXMLFormatting = Server.HTMLEncode(strInput)
	End If
End Function   
Sub Write(ByVal strString)
	Response.Write(strString)
End Sub
%>

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
kevp75Commented:
also note, there is nothing in the field Timestamp, however Timestamp1 contains a timestamp, so you may want to change the query to reflect this.
0
James MurrellProduct SpecialistAuthor Commented:
AAA+++ wish i could give more points - that is great big thanks -
0
kevp75Commented:
glad I could help!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Languages and Standards

From novice to tech pro — start learning today.