<HTML> <HEAD> <TITLE> New Document </TITLE> </HEAD>
<BODY> <% dim cn,rs,i set cn=server.createobject("adodb.connection") cn.open "driver={sql server};server=qgm;database=asptest;uid=sa;pwd=woainiany#" set rs=server.createobject("adodb.recordset") rs.open "select * from chapter1",cn,1 if len(request("i"))=0 then i=1 else if request("type")= "next" then i=request("i")+1 for j=1 to i-1 if not rs.eof then rs.movenext next elseif request("type")="previous" then i=request("i")-1 for j=1 to i if not rs.eof then rs.movenext next if not rs.bof then rs.moveprevious elseif request("type")= "first" then i=1 rs.movefirst elseif request("type")="last" then i=3 rs.movenext end if end if %> <p align="center">µ±Ç°¼Ç¼λÖÃ<%=i%></p> <table border="1" bordercolor="#111111" cellpadding="0" cellspacing="0" width="336" align="center"> <tr> <td width="79">×¢²áID</td> <td width="79">×¢²áÃÜÂë</td> <td width="138">e-mailµØÖ·</td> </tr> <%if not rs.eof and not rs.bof then%> <tr> <td width="79"><%=rs(0)%></td> <td width="79"><%=rs(1)%></td> <td width="138"><%=rs(2)%></td> </tr> <%end if%> </table> <p align="center"> <%if i<>1 then%> <a href="08_03.asp?type=first&i=<%=i%>">movefirst</a> <%else%> movefirst <%end if%> <%if not rs.eof then%> <a href="08_03.asp?type=previous&i=<%=i%>">movenext</a> <%else%> movenext <%end if%> <%if not rs.bof then%> <a href="08_03.asp?type=previous&i=<%=i%>">moveprevious</a> <%else%> moveprevious <%end if%> <%if i<>3 then%> <a href="08_03.asp?type=last&i=<%=i%>">movelast</a> <%else%> movelast <%end if %> <% rs.close set rs=nothing cn.close set cn=nothing %> </BODY> </HTML>
欢迎光临 编程论坛 (https://bbs.bccn.net/) | Powered by Discuz! 6.1.0 |