% Option Explicit Response.Expires = 0 Response.Buffer = True %> <% 'Variables on error resume next Const intPageSize = 10 Dim Connect, SQL_Query, RS_results, RNum Dim intCurrentPage, intTotalPages, IntI Dim PubLogged, Access 'Set the UK Locale Identity Session.LCID = 2057 'Check login attempt Access = Request.QueryString("Access") 'Assign values from form If Session("PubUser") = True Then PubLogged = "True" 'Create object container for database Set Connect = Server.CreateObject("ADODB.Connection") 'open database for access Connect.Open "B4P" 'Assign parameter value to search string 'Assign SQL string SQL_Query = "SELECT * FROM book ORDER BY NoTimesViewed DESC" 'Perform SQL pass Set RS_results = Server.CreateObject("ADODB.RecordSet") ' The CursorLocation and the CursorType must be set as they are here ' in order for Recordset Paging to work properly. RS_results.CursorLocation = 3 'adUseClient RS_results.CursorType = 3 'adOpenStatic RS_results.CacheSize = intPageSize ' Open the recordset. RS_results.Open SQL_Query, Connect, , , adCmdText Set RS_results.ActiveConnection = Nothing Connect.Close Set Connect = Nothing RNum=RS_results.RecordCount RS_results.PageSize = intPageSize if not(RS_results.EOF) then RS_results.AbsolutePage = intCurrentPage intTotalPages = RS_results.PageCount %>
|
|||||||||||||||||||||
| Established 2000 www.dreamstarbooks.com info@dreamstarbooks.com | |||||||||||||||||||||
|
|||||||||||||||||||||
Use of this site is subject certain Terms & Conditions. Please note our privacy policy. Reproduction in whole or in part in any form or medium without express written permission of DreamStar Books is prohibited. © Copyright DreamStar Books, all rights reserved. The © Copyright of each book is that of the author, unless otherwise stated. |
|||||||||||||||||||||