<%
sSQL="SELECT * FROM catdoc ORDER BY categoria ASC"
'constantes ADO VBScript
'Const adCmdText = &H0001
'Const adOpenStatic = 3
If Request.QueryString("pag")<>"" Then
Session("pagina")=Request.QueryString("pag")
Else
Session("pagina")=1
End If%>

<%
If RS.EOF AND RS.BOF Then%>
No hay
ningún documento en este momento
<%else
num_registros=18
RS.PageSize=num_registros
RS.AbsolutePage=Session("pagina")
While (Not RS.eof AND registros_mostrados < num_registros)
registros_mostrados=registros_mostrados+1
capas=capa+1%>
<% if capas=2 then%>
<%capas=0
end if%>
<%
RS.MoveNext
Wend
%>
Página:<%=Session("pagina")%> de <%=RS.PageCount%>
Mas categorias:>>
<%
i=0
While i
<%=i%>
<%
Wend
End if
RS.Close
Conn.Close
%>