<%
CatalogCode=Request.QueryString("pos")
set con=server.CreateObject ("ADODB.Connection")
set rs=server.CreateObject ("ADODB.Recordset")
con.Open Application("JzCon")
sqlstr="Select * from 文档 where Catalogcode='"&CatalogCode&"'and HaveInputed=True order by IssueTime desc"
rs.Open sqlstr,con,1,3
thestr=""
i=0
do while not rs.eof
DocTitle=trim(rs("Title"))
if rs("IsLink")=True then
thestr=thestr&"<tr>"
do while not rs.eof
if i<3 then
thestr=thestr&"<td><a href="&rs("DocFileName")&" target=_blank>"&DocTitle&"</a></td>"
else
exit do
end if
i=i+1
rs.movenext
loop
thestr=thestr&"</tr>"
else
thestr=thestr&"<tr>"
do while not rs.eof
if i<3 then
thestr=thestr&"<td><a href=/doc_template.asp?id="&rs("id")&"&file="&trim(rs("DocFileDir"))&trim(rs("DocFileName"))&"&docCatalog="&trim(rs("CatalogCode"))&" title="&DocTitle&" target=_blank>"&DocTitle&"</a></td>"
else
exit do
end if
i=i+1
rs.movenext
loop
thestr=thestr&"</tr>"
end if
rs.movefirst
i=0
loop
rs.Close
con.Close
set rs=nothing
set con=nothing
response.Write thestr
%>
<%
CatalogCode=Request.QueryString("pos")
set con=server.CreateObject ("ADODB.Connection")
set rs=server.CreateObject ("ADODB.Recordset")
con.Open Application("JzCon")
sqlstr="Select * from 文档 where Catalogcode='"&CatalogCode&"'and HaveInputed=True order by IssueTime desc"
rs.Open sqlstr,con,1,3
thestr=""
i=0
do while not rs.eof
if rs("IsLink")=True then
thestr=thestr&"<tr>"
do while not rs.eof
if i < 3 then
thestr=thestr&"<td><a href="&rs("DocFileName")&" target=_blank>"&DocTitle&"</a></td>"
else
exit do
i=i+1
rs.movenext
loop (此为40行)
thestr=thestr&"</tr>"
else
thestr=thestr&"<tr>"
do while not rs.eof
if i < 3 then
thestr=thestr&"<td><a href=/doc_template.asp?id="&rs("id")&"&file="&trim(rs("DocFileDir"))&trim(rs("DocFileName"))&"&docCatalog="&trim(rs("CatalogCode"))&" title="&DocTitle&" target=_blank>"&DocTitle&"</a></td>"
else
exit do
i=i+1
rs.movenext
loop
thestr=thestr&"</tr>"
end if
rs.movenext
i=0
loop
rs.Close
con.Close
set rs=nothing
set con=nothing
response.Write thestr
%>
报错为:Microsoft VBScript 编译器错误 错误 '800a040e'
<% i=0
Do While Not RS.EOF and i<RS.PageSize%>
<tr>
<% for j=1 to 5
if rs.eof then
exit for
end if %>
要显示的内容
<% rs.movenext next %>
</tr> <% i=i+1
loop
%>
我的通过了
if not rs.eof then
rs.pagesize=4-------这里设置要显示多少行
if pg="" then
pg="1"
rs.absoluteposition=1
else
rs.absoluteposition=pg*5*rs.pagesize-19-----这里是每一行显示5个记录,设置下一行的起始号
end if
end if
i = 0
do while not rs.EOF
Response.write "<tr>"
do while not rs.EOF
if i < 3 then
Response.write "<td>"
Response.write rs("fld")
Response.write "</td>"
else
exit do
end if
i = i + 1
rs.movenext
loop
i = 0
Response.write "</tr>"
loop
i = 0
do while not rs.EOF
Response.write "<tr>"
do while not rs.EOF
if i < 3 then
Response.write "<td>"
Response.write rs("fld")
else
exit do
end if
i = i + 1
rs.movenext
loop
i = 0;
Response.write "</tr>"
loop