Carissimi,
con questo mio post, vi chiedo un aiuto, cui non so come uscirne, su questo script:
<%
perpag=3
periodos = "allegati"
offset=request.QueryString("offset")
if offset="" then
offset=1
end if
tot=0
cicli=0
maxtemp=(perpag*offset)-perpag
perpagtemp=perpag*offset
set fs = Server.CreateObject("Scripting.FileSystemObject")
set fo = fs.GetFolder("d:\inetpub\webs\miositoit\public\test\" & periodos & "\")
set fe = fo.files
for each y in fe
extfile = left(split(y.Name,".pdf")(0),14)
nomefile = y.Name
Dim strPath
strPath = "D:\inetpub\webs\miositoit\mdb-database\prova.mdb"
strConnect = "DRIVER={Microsoft Access Driver (*.mdb)};" & "DBQ=" & strPath
Set conn = Server.CreateObject("ADODB.Connection")
Set rst = Server.CreateObject("ADODB.Recordset")
conn.open strConnect
criterio = "SELECT * FROM user WHERE codice= '" & extfile & "' AND attivo = 'SI' AND arch = 'SI'"
rst.Open criterio, conn, adOpenKeyset
if cicli >= maxtemp and cicli < perpagtemp then
While rst.EOF = False And cicli < perpag
%>
<table width="400" cellpadding="2" cellspacing="2" border="1">
<tr>
<td colspan="2">RECORD: <%=progressivo+1%></td>
</tr>
<tr>
<td>Nome:</td>
<td><%=rst.fields("nome")%></td>
</tr>
<tr>
<td>Cognome:</td>
<td><%=rst.fields("cognome")%></td>
</tr>
<tr>
<td>Cod. Cliente:</td>
<td><%=rst.fields("codice")%></td>
</tr>
<tr>
<td>E-mail:</td>
<td><%=rst.fields("email")%></td>
</tr>
<tr>
<td>Allegato:</td>
<td><%=nomefile%></td>
</tr>
</table>
<%
Progressivo = Progressivo +1
rst.MoveNext
cicli=cicli+1
Wend
end if
tot=tot+1
Next
avanti=offset+1
%>
<body>
<%if (offset*perpag) < tot then%> <a href="?offset=<%=avanti%>">Avanti</a><%end if%>
</body>
In pratica dalla seconda pagina non visualizzo + i dati, mentre è correttamente visibile il link AVANTI, quindi la paginazione dovrebbe funzionare, ma visualizzo i dati solo nella prima pagina.
Aiutatemi, sto uscendo letteralmente pazzo.
Grazie