The Forum has been Updated
The code has been upgraded to the latest .NET core version. Please check instructions in the Community Announcements about migrating your account.
Im trying to add an RSS link to my members personal pages,
displaying their latest blogs/updates in rss. I wrote a script and named it PageRSS.asp and have it linked like:
http://my.illhill.com/PageRSS.asp?id=XXXX
Here's the error I get:
Microsoft JET Database Engine error '80040e14'
Syntax error (missing operator) in query expression 'M.M_MEMBER_ID = & ppMember_ID'. /my/PageRSS.asp, line 30
Here's the code:
<rss version="2.0">
<!--
This web page is a data file that is meant to be read by RSS readers. To read these posts in an user-friendly layout visit http://my.illhill.com
-->
<channel>
<title>Blogs/Updates RSS Feed Sorted By Member</title>
<description>Blogs/Updates RSS Feed Sorted By Member</description>
<link>http://my.illhill.com</link>
<!--#INCLUDE FILE="config.asp" -->
<!--#INCLUDE FILE="inc_func_common.asp" -->
<!--#INCLUDE FILE="inc_func_secure.asp" -->
<%
set my_Conn = Server.CreateObject("ADODB.Connection")
my_Conn.Open strConnString
dim intResults,Topic_ID,strSubject,Topic_Replies,Topic_Last_Post_Reply_ID,Forum_Subject,LastReplyMsg
'disable images
strIcons = "0"
strIMGInPosts = "0"
if Request.QueryString("id") <> "" and IsNumeric(Request.QueryString("id")) = true then
ppMember_ID = cLng(Request.QueryString("id"))
else
ppMember_ID = 0
end if
strSql = "SELECT TOP 5 T.TOPIC_ID, T.T_SUBJECT, M.M_NAME, M.MEMBER_ID, T.T_DATE, T.T_SUBJECT, T.T_MESSAGE, T.T_AUTHOR, T.FORUM_ID "
strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS M, " & strTablePrefix & "TOPICS T"
strSql = strSql & " WHERE M.M_MEMBER_ID = & ppMember_ID "
strSql = strSql & " ORDER BY T.TOPIC_ID DESC"
set rs = my_Conn.Execute(strSql)
if currTopic <> rs("TOPIC_ID") then
currTopic = 0
TopicCount = 0
do until rs.EOF or (TopicCount = 5)
if currTopic <> rs("TOPIC_ID") then
Response.Write "<item>" & vbNewline
Response.Write "<title>" & rs("T_SUBJECT") & "</title>" & vbNewline
Response.Write "<description>" & rs("T_MESSAGE") & "</description>" & vbNewline
Response.Write "<link>http://www.illhill.com/" & rs("M_NAME") & "#" & rs("TOPIC_ID") & "</link>" & vbNewline
Response.Write "</item>" & vbNewline
TopicCount = TopicCount + 1
end if
rs.MoveNext
loop
end if
rs.close
set rs = nothing
%>
</channel>
</rss>
Any suggestions on what I'm doing wrong?
Thanks, Dominic
<
displaying their latest blogs/updates in rss. I wrote a script and named it PageRSS.asp and have it linked like:
http://my.illhill.com/PageRSS.asp?id=XXXX
Here's the error I get:
Microsoft JET Database Engine error '80040e14'
Syntax error (missing operator) in query expression 'M.M_MEMBER_ID = & ppMember_ID'. /my/PageRSS.asp, line 30
Here's the code:
<rss version="2.0">
<!--
This web page is a data file that is meant to be read by RSS readers. To read these posts in an user-friendly layout visit http://my.illhill.com
-->
<channel>
<title>Blogs/Updates RSS Feed Sorted By Member</title>
<description>Blogs/Updates RSS Feed Sorted By Member</description>
<link>http://my.illhill.com</link>
<!--#INCLUDE FILE="config.asp" -->
<!--#INCLUDE FILE="inc_func_common.asp" -->
<!--#INCLUDE FILE="inc_func_secure.asp" -->
<%
set my_Conn = Server.CreateObject("ADODB.Connection")
my_Conn.Open strConnString
dim intResults,Topic_ID,strSubject,Topic_Replies,Topic_Last_Post_Reply_ID,Forum_Subject,LastReplyMsg
'disable images
strIcons = "0"
strIMGInPosts = "0"
if Request.QueryString("id") <> "" and IsNumeric(Request.QueryString("id")) = true then
ppMember_ID = cLng(Request.QueryString("id"))
else
ppMember_ID = 0
end if
strSql = "SELECT TOP 5 T.TOPIC_ID, T.T_SUBJECT, M.M_NAME, M.MEMBER_ID, T.T_DATE, T.T_SUBJECT, T.T_MESSAGE, T.T_AUTHOR, T.FORUM_ID "
strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS M, " & strTablePrefix & "TOPICS T"
strSql = strSql & " WHERE M.M_MEMBER_ID = & ppMember_ID "
strSql = strSql & " ORDER BY T.TOPIC_ID DESC"
set rs = my_Conn.Execute(strSql)
if currTopic <> rs("TOPIC_ID") then
currTopic = 0
TopicCount = 0
do until rs.EOF or (TopicCount = 5)
if currTopic <> rs("TOPIC_ID") then
Response.Write "<item>" & vbNewline
Response.Write "<title>" & rs("T_SUBJECT") & "</title>" & vbNewline
Response.Write "<description>" & rs("T_MESSAGE") & "</description>" & vbNewline
Response.Write "<link>http://www.illhill.com/" & rs("M_NAME") & "#" & rs("TOPIC_ID") & "</link>" & vbNewline
Response.Write "</item>" & vbNewline
TopicCount = TopicCount + 1
end if
rs.MoveNext
loop
end if
rs.close
set rs = nothing
%>
</channel>
</rss>
Any suggestions on what I'm doing wrong?
Thanks, Dominic
<