Bonjour
j'ai un petit probléme , sans la pagination ca marche mais avec ca marche pas
voici le code complet
dim nmax,ncur,ndeb,Npag
Nmax = 10 ' nombre par page -----------------------pagination-----
Ncur = 0 ' n° de la fiche courante
Ndeb = 0 ' 1ère fiche transmise par l'URL
if request.queryString("num")<>"" then _
Ndeb = Cint(request.queryString("num"))
dim o,s
s=0
o=0
while (not objRS.eof and Ncur<Nmax+Ndeb and s < 10)
if Ncur >= Ndeb then
response.write "<tr><TD bgcolor =#E2ECF5 height= style=border-top-width:1; border-right-width:1; border-bottom-width:1; border-left-width:1; border-color:black; border-style:solid;><font bgcolor =#E2ECF5 color=black size=2><center>" &objrs("etablis_payeur")&" N°: "&objrs("NUM_AGENCE")&"</TD></font>"
response.write "<TD bgcolor =#E2ECF5 style=border-top-width:1; border-right-width:1; border-bottom-width:1; border-left-width:1;border-color:black; border-style:solid;><font bgcolor =#E2ECF5 color=black size=2><center>" &objrs("nom_tireur")&"</TD></font>"
response.write "<TD bgcolor =#E2ECF5 style=border-top-width:1; border-right-width:1; border-bottom-width:1; border-left-width:1; border-color:black; border-style:solid;><font bgcolor =#E2ECF5 color=black size=2><center>" &objrs("num_cheque")&"</TD></font>"
response.write "<TD bgcolor =#E2ECF5 style=border-top-width:1; border-right-width:1; border-bottom-width:1; border-left-width:1; border-color:black; border-style:solid;><font bgcolor =#E2ECF5 color=black size=2><center>" &CCUR(objrs("montant_cheque"))&"</TD></font>"
end if
objrs.movenext
Ncur = Ncur + 1
s=s+1
wend
If not s = 10 Then
Dim x
For x = s to 10
response.write("<tr><td> </td><td> </td><td> </td><td> </td></tr>")
Next
End if
response.write"<p><font bgcolor =#E2ECF5 face=Verdana color=gray size =1>Nombre :</font><font bgcolor =#E2ECF5 face=Verdana color=red size =1>"&objrs.recordcount&"</font></p>"
%>
</tr>
<tr><td colspan="3" width="206" bordercolor="#FFFFCC" height="1"> </td>
<td width="86" bordercolor="#FFFFCC" height="1" bgcolor="#FFFFCC"> <%response.write objrsg("g")%>
DZD</td>
</tr>
</table>
<p align="left"> <%%><%
if Ndeb > 0 then%></p>
<div align="left">
<table>
<td valign=top height="22">
<A href="?num=<%=Ndeb-Nmax%>">Retour</A>
</td>
<%end if%>
<td height="22">
<p align="left"><% ' N° des pages
Npag = int(objRS.recordCount/Nmax)
if Npag < objRS.recordCount/Nmax then Npag = Npag + 1
dim i
for i = 1 to Npag
' Page courante ?
if Ndeb = (i-1)*Nmax then%>
<b>Page <%=i%>
<%else%>
<A href="?num=<%=(i-1)*Nmax%>"
> <%=i%> </A>
<%end if
next%>
</b>
</td>
<% ' Des fiches après ?
if not objRS.eof then%>
<td valign=top height="22">
<A href="?num=<%=Ncur%>">Suite</A>
</td>
<%
end if
