Ciao,
ho una paginazione che mi è sempre funzionata anche nei casi più estremi,ma stavolta no funziona.
L'unica differenza dalle altre è che ho due do while not ... perchè il layout della pagina non è uguale per tutti i record.
L'errore che mi dà consiste nel fatto che non mi visualizza gli ultimi record ovvero l'ultima pagina.
Questo è il codice:
<%
pg=request.querystring("pg")
if request.querystring("giorno") <> "" then
giorno=request.querystring("giorno")
mese=request.querystring("mese")
anno=request.querystring("anno")
else
giorno=request.form("giorno")
mese=request.form("mese")
anno=request.form("anno")
end if
%>
html etc.
<%set Conn=Server.CreateObject("ADODB.Connection")
set st=Server.CreateObject("ADODB.Recordset")
Conn.Open "PROVIDER=MSDASQL;" & _
"DRIVER={Microsoft Access Driver (*.mdb)}; " & _
"DBQ=" & server.mappath("ria.mdb")
st.cursortype=adOpenStatic
rowcount=0
pagesize=3
inizio = (pg - 1) * pageSize
st.Open "SELECT * FROM agenda WHERE giorno='"&giorno&"' and mese='"&mese&"' and anno='"&anno&"' ", Conn,1
st.PageSize=3
st.AbsolutePage = pg
if not st.bof and not st.eof then
do while not st.eof and rowcount < 1
rowcount=rowcount+1%>
tabella html
<%st.Movenext
Loop
end if
%>
html
<%
if not st.bof and not st.eof then
do while not st.eof and rowcount < st.Pagesize
rowcount=rowcount+1
%>
tabella html
![]()
<%
st.Movenext
Loop
end if
%>
html
<%
IF st.PageCount > 1 THEN %>
<span class="2">Vai a pagina..</span>
<%FOR i = 1 TO st.PageCount%>
<%IF i <> cINT( pg ) THEN %>
<font color="#000000"> <%=i%></font> 
<%ELSE%>
<span class="2"><font color="#000000"><%=i%></font></span>
<%
L=i+1
H=i-1
IF st.PageCount = cINT(pg) THEN
L = st.PageCount
END IF
If pg = 1 then
H = 1
END IF
END IF
NEXT
end if
%>
qualcuno potrebbe aiutarmi a risolvere questo problema?