Seguendo la guida: http://asp.html.it/script/vedi/884/i...-un-recordset/
ho cercato di adattarla al mio sito però purtroppo qualcosa non va:
<%
page = Request.QueryString("page")
perpage = 45
Set RSa = Server.CreateObject("ADODB.Recordset")
RSa.ActiveConnection = con
sqlString = "select id from console where lcase(nome) = '" & lcase(idx) & "'"
RSa.open sqlString
idr = rsa("id")
ok = -1
Set RS = Server.CreateObject("ADODB.Recordset")
RS.ActiveConnection = con
sqlString = "SELECT * from articoli WHERE attivo = " & ok & " AND console = " & idr & " order by articoli.titolo asc"
RS.open sqlString, con, 1, 3
foto = rs("foto11")
if foto = "" or isnull(foto) then
foto = "vuota.jpg"
end if
If page = "" then
page = (rs.PageCount)
End if
Rs.PageSize = perpage
Rs.AbsolutePage = page
For i = 1 to perpage
If Not Rs.EOF then
Response.Write ("<table width=""580""><tr><td width=""60"">[img][/img]</td><td><font size=""2"" face=""Verdana"">" & rs("titolo") & "
Pubblicato il " & rs("data") & "
Letto " & rs("click") & " volte</font></td></tr></table>")
Rs.MoveNext
end if
next
Response.Write "
Pagine:"
For pag= 1 to rs.PageCount
if page = pag then
Response.Write ""
Response.Write "<A href='consoleall2.asp?id=" & idx & "&page=" & pag
Response.write "'>"
Response.Write pag
Response.Write "</A> "
Response.Write ""
else
Response.Write "<A href='consoleall2.asp?id=" & idx & "&page=" & pag
Response.write "'>"
Response.Write pag
Response.Write "</A> "
end if
Next
Response.Write "</P>"
Rs.Close
Set Rs = Nothing
Con.Close
Set Con = Nothing
%>
Il numero della pagina corrente dovrebbe essere in grassetto invece resta normale, tutto il resto funziona benissimo, dove sbaglio? :master:

Rispondi quotando