0

I have the following code that displays data from a. Mdb, they are displayed in descending order. I have the problem that I want the results to be displayed from 10 to 10 for each page as it now displays all the data at once.
If someone helps me create the code, I compensated with cash payment
Thanks

<%
'Open conexion ODBC
Set con = Server.CreateObject("ADODB.Connection")
Con.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("./news.mdb")&";"

'Ejecute sentence SQL 
sql = "SELECT * FROM News  ORDER BY id DESC"
Set result = con.Execute(sql)
' Go through all the rows in the result
Do While Not result.EOF
' Displays the current row
Response.Write "<p><b><font face=Verdana size=1><a href=noticia.asp?id=" &result.Fields("id") & ">"&result.Fields("titulo")&"</a></b><br><font color=""#696969"">• " &result.Fields("copete") & "</font></font></p>"

'Go to the next row
result.MoveNext
Loop
'frees memory
result.Close
Set result = Nothing
con.Close
Set con = Nothing
%>

Edited by Ezzaral: Added code tags. Please use them to format any code that you post.

2
Contributors
1
Reply
2
Views
6 Years
Discussion Span
Last Post by stbuchok
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.