
22/02/2002, 16:06
|
| | Fecha de Ingreso: febrero-2002
Mensajes: 184
Antigüedad: 23 años, 2 meses Puntos: 0 | |
Re: Paginar Aquí te mando uno que hice hace poco. Es muy humilde, sólo "siguiente" y "anterior"
Te lo mando en 2 mensajes:
<%response.buffer = true%>
<html>
<body bgcolor="#003366" marginheight="0" topmargin="0">
<!--#Include file="adovbs.inc" -->
<% set oConn=Server.CreateObject("ADODB.Connection&q uot;)
set rs=Server.CreateObject("ADODB.Recordset" )
oConn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=c:/inetpub/wwwroot/claves.mdb;"
rs.open "archivos", Oconn, adopenstatic, adcmdtable
numero_pagina=0
if request.form <> "" then
numero_pagina=request.form("pagina")
end if
cantidad_registros=1
if numero_pagina<>0 then
for i=1 to numero_pagina*2
rs.movenext
next
end if
do while (not rs.eof and cantidad_registros <= 2) %>
<% response.write(rs("enunciado"))
response.write("<br>")
rs.movenext
cantidad_registros=cantidad_registros + 1
%>
<% loop %>
<%if rs.eof then
proxima_pagina=0
else
proxima_pagina=1
end if %>
<br>
<% if cantidad_registros=3 and proxima_pagina=1 and numero_pagina=0 then %>
<form name="paginacion" method="post" action="http://enrique/default.asp" >
<input type="submit" value="siguiente>>">
<input type="hidden" name="pagina" value="<% response.write(numero_pagina + 1)%>">
</form>
<% end if %> |