大家好,我是个菜鸟,刚做了个简单的asp 程序
第一页就可以正常显示,可后面的页面就无法显示出來!
晕!
代码如下,请各位大侠帮我看看!先谢了!
set cnn = server.CreateObject("ADODB.Connection")
set rst = server.CreateObject("ADODB.Recordset")
cnn.ConnectionString = "Driver={SYBASE SYSTEM 11};Srvr=123456;Uid=aaa;Pwd=aaaaaa;database=ddd;"
cnn.open
rst.CursorLocation = 3
rst.CursorType = 1
rst.PageSize = 25
currentPage = request.QueryString("currentPage")
rst.absolutePage = currentPage
if currentPage = "" then
currentPage = 1
else
currentPage = cint(currentPage)
end if
v_select = request.Form("select_v")
fdate_st = trim(request.Form("mytimest"))
fdate_ed = trim(request.Form("mytimeed"))
trno_t = trim(request.Form("t_trno"))
if fdate_st = "" and fdate_en = "" and trno_t = "" and v_select = "all" then
sSQL = "select * from servisit order by fdate DESC"
end if
rst.open sSQL,cnn,1,1
If rst.RecordCount=0 then
response.Write "<P><font color = red>没有找到符合条件的记录!</font></p>"
else
rst.AbsolutePage = CLng(Request("CurrentPage"))
rowcount = 0
%>
<td colspan="3" borderColorLight=#4e9b00 align=middle borderColorDark=#ffffff height=18><div align="center">查询结果:共
<% = rst.RecordCount %>
条记录</div></td>
</tr>
</table>
<p align="center">每页<% = rst.pagesize %>条记录 当前页次: <% = currentPage %>/<% = rst.pagecount %>页
<%
for i = 1 to rst.pagecount
if i = CInt(currentPage) then %>
[<font color="#FF0000"><% = i %></font>]
<% else %>
[<a href="browseinfo.asp?currentPage=<% = i %>"><% = i %></a>]
<%
end if
next
end if
rst.close
Set rst=nothing
%>
</p>
</body>
</html>
[此贴子已经被作者于2007-11-13 11:48:29编辑过]