|
<%@Language=VBScript%>
<!--#include file=conn.asp-->
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
</Head>
<Body bgcolor=#c1f7d8>
<p align=center><font size=5>阅读文章</font></p>
<%
dim strDsn,strSelectSql
set rs=server.createobject("adodb.recordset")
strSelectSql="select * from article where articleid="&Request.QueryString("id")
rs.Open strselectsql,conn,3,1
%>
<table border=1 width=100%>
<tr>
<td align=center width=25%>时间</td>
<td align=center width=49%>主题</td>
<td align=center width=10%>作者</td>
<td align=center width=8%>被读</td>
<td align=center width=8%>跟帖</td>
</tr>
<tr>
<td align=center><%=rs("articledate")%> <%=rs("articletime")%></td>
<td align=center><%=rs("articletitle")%>
<td align=center><%=rs("articleauthor")%>
<td align=center><%=rs("articleaccessnumber")%>
<td align=center><%=rs("articlefellownumber")%>
</tr>
</table>
<br>
<br><br>
<%=rs("articlecontent")%>
<%
rs.close
set rs=nothing
%>
<%
strchangesql="update article set articleaccessnumber=articleaccessnumber+1 where article="&Request.QueryString("id")
set changes=server.createobject("adodb.recorder")
changers.open strChangesql,conn,1,3
set changes=nothing
%>
<%
strselectsql="select*from article where articleparent="&request.querydtring("id")
set rs=server.createobject("adodb.recordset")
rs.open strselectsql,conn,3,1
rs.pagesize=10
nextpage=request.form("newpage")
if nextpage=""then
session("abspage")=1
else
if nextpage="上一页"then
seesion("abspage")=session("abspage")-1
elseif nextpage="下一页"then
session("abspage")=session("abspage")+1
elseif nextpage="第一页" then
sesson("abspage")=1
elseif nextpage="最后一页" then
session("abspage")=rs.pagecount
end if
rs.absolutepage=sesson("abspage")
end if
if rs.recordcount>0 then
i=0
response.write"<table border=1 width=100%/>"
response.write"<tr><td colspan=5 align=center>"
response.write"共有"&rs.Recordcount&"个跟帖"
%>
<tr>
<td align=center width=25%>时间</td>
<td align=center width=49%>主题</td>
<td align=center width=10%>作者</td>
<td align=center width=8%>被读</td>
<td align=center width=8%>跟帖</td>
</tr>
<%
do while not rs.eof and i<10
%>
<tr>
<td align=center><%=rs("articledate")%> <%=rs("articletime")%></td>
<td align=center><%=rs("articletitle")%>
<td align=center><%=rs("articleauthor")%>
<td align=center><%=rs("articlefellownumber")%>
</tr>
<%rs.movnext
i=i+1
loop
rsponse.write"</table></center>"
respose.write"<center><form action showlist.asp method=post>"
if rs.pagecount>1 then
if(session("abspage"))>1 then
response.write"<input type=submit value=上一页 name=nextpage>"
end if
if(session("abspage"))<rs.pagecount then
response.write"<input type=submit value=下一页 mame=nextpage>"
end if
end if
response.write"</form>"
end if
rs.close
set rs=nothing
%>
</tr>
</table>
<hr>
<form action=publisharticle.asp method=post>
<input type=hidden name=articleid value=<%=Request.QueryString("id")%>>
<table border=0>
<tr>
<td>主题:</td>
<td><input type=tex name=title size=61></td>
</tr>
<tr>
<td colspan=2>内容:</td>
</tr>
<tr>
<td colspan=2><textarea id=textarea1 name=content
style="Height:100px;width:500px"></textarea></td>
</tr>
</table>
<center><br>
<input id=submit1 name=submit type=submit value=跟帖文章>
<input id=submit1 name=submit type=submit value=发表文章>
<input id=reset name=rset1 type=reset value=重写文章>
</center>
</form>
</BODY>
</HTML>
运行时出现了下面的错误,请各位大侠指点一下迷津
错误类型:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC Microsoft Access Driver] 语法错误 (操作符丢失) 在查询表达式 'articleid=' 中。
/test/readarticle.asp, 第 14 行 |
|