不好意思,又麻烦大家,我实在没有办法~!我调了半天,老是出错~帮忙看一下这段代码~!
这是代码
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<!--#include file="path.asp"-->
<%dim zj,zz1
zfl_idd=request("dl_id")
zfl_id=trim(request("dl_id"))
%>
<%set rs=server.createobject("ADODB.recordset")
rs.open "Select count(*) as total from new where zfl_id='"& zfl_id &"'",con,1,1
set rs1=server.createobject("ADODB.recordset")
rs1.open "Select *from new where zfl_id='"&zfl_id&"' order by new_id desc",con,1,1
set rs3=server.createobject("ADODB.recordset")
rs3.open "select * from zfl where zfl_id="&zfl_id,con,1,1
%>
<HTML><HEAD><TITLE>新高新网络文学<%=rs3("zfl_name")%></TITLE>
<link rel="stylesheet" href="css2.css" type="text/css">
</head>
<BODY text=#000000 bgColor=#ffffff topMargin=0 leftmargin="5">
<table width="713" border="0" cellspacing="1" cellpadding="0" align="center" height="183">
<tr>
<td bgcolor="#FFFFFF" valign="top" height="275">
<table width="750" border="0" cellpadding="0" cellspacing="0" height="198">
<tr>
<td bgcolor="#FFFFFF" height="235" valign="top" width="318"> </td>
<td bgcolor="#FFFFFF" height="294" valign="top" width="300">
<table width="100%" border="0" cellpadding="0" cellspacing="0" height="42" align="center">
<tr bgcolor="#FFFFFF">
<td width="42%" height="21">
<div align="left"><img src="imagewx/line4.jpg" width="183" height="18"></div>
</td>
</tr>
<%if rs1.eof and rs1.bof then
response.write"<td colspan='3' bgcolor='#f3f3f3'> "&rs3("zfl_name")&"下还没有文章呢,等你来投稿呢!^_^</td>"
response.end
else
recordtotal=rs("total")
pagecount=10
pagenum=int(recordtotal/pagecount+0.5)
page=request("page")
k=0
rs1.move pagecount*page
do while not rs1.eof
k=k+1
if k>10 then exit do
%>
<tr bgcolor="#FFFFFF">
<td width="42%" height="18" >
<% if len(trim(rs1("biaoti")))>30 then%>
<img src="imagewx/di.gif" width="12" height="11"><a href="news.asp?new_id=<%=cstr(rs1("new_id"))%>" target="_blank"><%=mid((trim(rs1("biaoti"))),1,30)%></a><a href="news.asp?new_id=<%=cstr(rs1("new_id"))%>" target="_blank">...</a>
<%else%>
<a href="news.asp?new_id=<%=cstr(rs1("new_id"))%>" target="_blank"><img src="imagewx/di.gif" width="12" height="11" border="0"></a>
<a href="news.asp?new_id=<%=cstr(rs1("new_id"))%>" target="_blank"><%=left(trim(rs1("biaoti")),15)%></a>
<% end if
if rs1("img")=1 then
response.write "<img src='images/img.gif' border=0 width=16 height=16 align=middle>"
end if
%>
<%dim two_d
two_d=DateDiff( "d", CDate(rs1("time")), Now)
if two_d<=3 then
%>
<img src="IMAGES/newdd.gif" width="28" height="11">
<%
end if
%>
<a href="aa.htm"> </a></td>
</tr>
<% rs1.movenext
num=num+1
loop
rs1.close
set rs1=nothing
end if%>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="23">
<tr>
<td>
<%if pagenum>10 then pagenum=10%>
总页数:
<%for i=0 to pagenum%>
<a href="zfl.asp?page=<%=i%>&zz=<%=zfl_idd%>"><%=i+1%></a>|
<%next%>
</td>
</tr>
</table>
</td>
<td bgcolor="#FFFFFF" height="249" valign="top" width="154">
<table width="99%" border="0" cellspacing="0" cellpadding="0" height="82" align="center">
<tr>
<td valign="top" height="112" bgcolor="#FFFFFF">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="26">
<tr>
<td bgcolor="#FFFFFF" height="15">
<div align="center"><font color=#ffffff><img src="imagewx/link1.jpg" width="136" height="20"></font></div>
</td>
</tr>
</table>
<%set rs10=server.createobject("ADODB.recordset")
rs10.open"select new_id from new where zfl_id='"&request("zfl_id")&"'",con,1,1
function todays()
dim tmprs
tmprs=cn.execute("Select count(new_id) from new Where zfl_id=zfl_id and year(time)=year(date()) and month(time)=month(date()) and day(time)=day(date())")
todays=tmprs(0)
set tmprs=nothing
if isnull(todays) then todays=0
end function
function toweeks()
dim tmprs
tmprs=cn.execute("Select count(new_id) from new Where zfl_id=zfl_id and year(time)=year(date()) and month(time)=month(date())and day(date())-day(time)<=7")
toweeks=tmprs(0)
set tmprs=nothing
if isnull(toweeks) then toweeks=0
end function
%>
<div align="center"><%=rs3("zfl_name")%>文章总数:<font color="#ff0000"><%=rs10.recordcount%></font><br>
<%=rs3("zfl_name")%>今日文章:<font color="#ff0000"><%=todays()%></font><br>
<%=rs3("zfl_name")%>本周文章:<font color="#ff0000"><%=toweeks()%></font></div>
</td>
</tr>
<%rs3.close
set rs3=nothing%>
</table>
</td>
</tr>
</table>
<div align="left"></div>
</td>
</tr>
</table>
<p align="center"><b><font size="2"> </font></b></p>
</BODY></HTML>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
这是错误提示~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
在点击分页时出现以下问题~
错误类型:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E21)
/hotweb1/zfl.asp, 第 11 行
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
主要是分页的问题`!~我也不想把这么长的代码贴出来~!`可就我一个人~!没有办法`!
只有请教各位大哥了~!如果为难~!`请大家指出来`!~
谢谢~