Ciao
sapete spiegarmi perchè non si vede nessun record, nella prima pagina? Devo fare un loop da qualche parte?
codice:<% Dim intPageSize, intRecordCount, intRecords, intLastPage, intCurrentPage intPageSize = 3 '--- define the page size you want 'Lettura Dim StrSQL SUBConn("pro.mdb") SUBRS() StrSQL = "SELECT * FROM occ" Set ObjRS = Server.CreateObject("ADODB.Recordset") ObjRS.Open StrSQL, Conn ,3,3 'rs.open SQL, Connection, adOpenStatic, adLockReadOnly, adCmdText intRecordCount = ObjRS.RecordCount '--- fetch the total number of records in the database If Not ObjRS.EOF Then If Len(Request.QueryString("page")) > 0 then intCurrentPage = CLng(Request.QueryString("page")) Else intCurrentPage = 1 End if For intRecords = 1 to intRecordCount If intRecords = ((intCurrentPage * intPageSize) - intPageSize) Then Response.Write(ObjRS("Nome")& " ") End if ObjRS.Movenext Next Else response.write "No record found" End if SUBOpenRS() SUBCloseConn() intLastPage = int(intRecordCount/intPageSize) + 1 '--- calculates the last page number if intLastPage = 0 then intLastPage = 1 '--- set always last page > 0 to avoid errors Call PageNav(intCurrentPage, intLastPage) '--- cal the pagenav function and show navigation commands %> </div>

Rispondi quotando

