You make code to accept page number in the URL then use the links to pass the page number in the URL.
nikkiH
Junior Poster in Training
79 posts since Dec 2006
Reputation Points: 13
Solved Threads: 4
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
Hellodear
Junior Poster in Training
53 posts since Feb 2007
Reputation Points: 11
Solved Threads: 0