<% Set myFSO=Server.CreateObject("Scripting.FileSystemObject") intRecordsPerPage=12 'If this is the first time the page is displayed then the page position is set to page 1 If request.querystring("PagePosition") = "" Then intRecordPositionPageNum = 1 'Else the page has been displayed before so the page postion is set to the Record Position number Else intRecordPositionPageNum = CInt(request.querystring("PagePosition")) End If set rs = server.CreateObject("adodb.recordset") yday = date() set cnvideo = server.CreateObject("adodb.connection") myString = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ="& Server.MapPath("db/video.mdb") cnvideo.open mystring set rslog=server.CreateObject("adodb.recordset") rslog.open "select * from video_log",cnvideo,1,3 set rsvideo=server.CreateObject("adodb.recordset") set rsblog=server.CreateObject("adodb.recordset") rsblog.open "select * from TotalCommentCount",cnvideo,2,3 str="select * from VideoListing " %> <% str=str '& " order by edate desc,displayno,videoname" rsvideo.open str,cnvideo,1,3 'for paging set rstype=server.CreateObject("adodb.recordset") rstype.open "select * from VideoListing",cnvideo,1,3 if not rsvideo.eof then lngTotalRecordsFound = CLng(rsvideo.RecordCount) 'Set the number of records to display on each page by the constant set at the top of the script rsvideo.PageSize = intRecordsPerPage 'Get the page number record poistion to display from IF NOT rsvideo.EOF Then rsvideo.AbsolutePage = intRecordPositionPageNum 'Count the number of pages the search results will be displayed on calculated by the PageSize attribute set above lngTotalNumPages = CLng(rsvideo.PageCount) 'Calculate the the record number displayed from and to on the page showing intRecordDisplayFrom = (intRecordPositionPageNum - 1) * intRecordsPerPage + 1 intRecordDisplayedTo = (intRecordPositionPageNum - 1) * intRecordsPerPage + intRecordsPerPage If intRecordDisplayedTo > lngTotalRecordsFound Then intRecordDisplayedTo = lngTotalRecordsFound end if end if %> IE Events Videos