
11/03/2005, 04:23
|
| | Fecha de Ingreso: octubre-2003
Mensajes: 364
Antigüedad: 21 años, 6 meses Puntos: 1 | |
Ayuda con esta Paginacion El problema es que al apsar de pagian no me conserva la select del buscador. Como puedo hacerlo.
vautor=Request.Form("autor")
vtematica=Request.Form("tematica")
vtitulo=Request.Form("titulo")
veditorial=Request.Form("editorial")
vformato=Request.Form("formato")
sql="select * from libro where (Nombre <>'qwqeewqewq')"
if(vautor="") then
else
sql4=" and Autor like '%" &vautor& "%'"
end if
if(vtitulo="") then
else
sql5=" and Nombre like '%" &vtitulo& "%'"
end if
sql3=sql & sql4 & sql5 & "order by Nombre"
oRs.Open sql3,oConn,3,1
mostrar = 2
oRs.PageSize = mostrar
oRs.CacheSize = mostrar
CantidadRegistros = oRs.RecordCount
if Request.Querystring("pagina")="" then
pag_actual=1
else
pag_actual=CInt(Request.Querystring("pagina"))
end if
pag_totales = oRs.PageCount
if pag_actual < 1 then
pag_actual = 1
end if
if pag_actual > pag_totales then
pag_actual = pag_totales
end if
if pag_totales=0 then
Response.Write("")
else
oRs.AbsolutePage = pag_actual
cant_registros = 0
%>
<table width="480">
<tr>
<td class="fechascroll"><%
response.write " Se han encontrado: "
response.write CantidadRegistros
response.write " resultados "
%></td>
<td class="fechascroll"> <div align="right">
<%
if pag_actual > 1 then
Response.Write("<A class=paginar HREF=buscador.asp?pagina="& pag_actual-1&"><<</A> ")
end if
Response.Write("Página " & Pag_actual & " de " & pag_totales & " ")
if pag_actual < pag_totales then
Response.Write("<A class=paginar HREF=buscador.asp?pagina=" & pag_actual+1 &">>></A>")
end if
%>
gracias |