4
Contributors
3
Replies
4
Views
10 Years
Discussion Span
Last Post by Hellodear
0

You make code to accept page number in the URL then use the links to pass the page number in the URL.

0

That's pretty easy. You first use a Recordset, the you define the number of the records you want to be displayed per page, and you define the pageNumber you are in, and there you go. I would look like:

ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("datanase.mdb")' & ";" ' Accessset TheConnection = Server.CreateObject("ADODB.Connection")TheConnection.Open ConnectionStringSet RS = Server.CreateObject("ADODB.RECORDSET") RS.PageSize = 10 ' Or PageSize RS.CacheSize = PageSize RS.CursorLocation = adUseClient RS.Open "SELECT * FROM TABLE Where CONDITION_ETC;",TheConnection,3,3 CatEntries = RS_SHOW_ADS.RecordCount TotalPages = RS_SHOW_ADS.PageCount CurrentPage = CInt(Request("page")) RS.AbsolutePage = CurrentPage

Now you just need to show the data. When trying to switch between pages, remember to send along the CurrentPage-Variable. You can use the QueryString.

Good luck

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.