asp 用存储过程实现数据分页

来源:asp论坛 作者:佚名 2007-10-12 出处:pcdog.com

java  javascript  存储过程  
上一页 1 2 3 4 5 下一页 
  四、search_koushi.asp


<!-- #include file="conn.asp" -->
<%
line=6
if request("page")="" then
page=1
else
page=request("page")
end if


if page<1 then
page=1
end if



title=trim(request("title"))
list2_id=trim(request("list2_id"))
set rs2=conn.execute("sp_c 'tiku_koushi','"&title&"','"&list2_id&"'")
pagecount=CInt(rs2(0)\line)
if(CInt(rs2(0)) mod line)=0 then
pagecount=pagecount
else
pagecount=pagecount+1
end if


if CInt(page)>=pagecount then
page=CInt(pagecount)
end if
str=""
str=str&"page="&page&"&title="&title&"&list2_id="&list2_id
set rs=conn.execute

("sp_search_tiku 'tiku_koushi','"&title&"','"&list2_id&"','"&line&"','"&CInt(page)&"'")
if rs.eof then
response.write "no record"




更多内容请看PCdog.com--asp 存储过程专题
上一页 1 2 3 4 5 下一页 
上一篇:IIS6.0服务器架站无法访问解决方案总结
下一篇:ASP 五大高效提速技巧