c'è tutto... anche io ho dubbi sui permessi. per sicurezza ti posto tutto il codice. quattro occhi sono meglio di due.
l'errore è preciso è
ADODB.Recordset error '800a0cb3'
Current Recordset does not support bookmarks. This may be a limitation of
the provider or of the selected cursortype.
/ElencoFornitori.asp, line 128
ovvero
rstUtenti.AbsolutePage = iCurrentPage
codice:
<%@ Language = VBScript %> <% Response.addheader "pragma","no-cache" %> <% Response.buffer=true %> <% Session.Timeout = 120 %> </script> <% Dim RagSocSrc: RagSocSrc = Trim(Request.Form("RagSocSrc")) Dim PIvaSrc: PIvaSrc = Trim(Request.Form("PIvaSrc")) Dim CittaSrc: CittaSrc = Trim(Request.Form("CittaSrc")) ' Apro la connessione al database Set conn = Server.CreateObject("ADODB.Connection") conn.Open StrConn if Request.QueryString("Elimina") = "1" then conn.Execute "DELETE * FROM Utenti WHERE IDUtente = " & Request.QueryString("IDUtente") end if Const BLANK = "" function Selected (FirstValue, SecondValue) if cStr(FirstValue) = cStr(SecondValue) then Selected = "Selected" end if end function ' ---------------------------------------------------------- BEGIN CODE TO PAGING ' Declare our vars Dim iPageSize 'How big our pages are Dim iPageCount 'The number of pages we get back Dim iPagesShown 'The number of pages we show - cyb Dim iCurrentPage 'The page we want to show Dim iPreviousPage 'Cyb Dim iNextPage 'Cyb Dim Action 'Cyb Dim iRecordsShown 'Loop controller for displaying just iPageSize records Dim I 'Standard looping var ' Get parameters iPageSize = 15 'You could easily allow users to change this iPagesShown = 10 'You could easily allow users to change this ' Retrieve page to show or default to 1 If Request.QueryString("Action") = "" Then Action = "Stay" iCurrentPage = 1 Else Action = Request.QueryString("Action") ' All valued if action = Stay iCurrentPage = CInt(Request.QueryString("CurrentPage")) iNextPage = CInt(Request.QueryString("NextPage")) iPreviousPage = CInt(Request.QueryString("PreviousPage")) End If ' ---------------------------------------------------------- END CODE TO PAGING Dim SQLStatement Dim SQLWhere SQLWhere = "WHERE Tipo = 'Fornitore' " if trim(RagSocSrc) <> "" then SQLWHERE = SQLWHERE & " AND RAGIONESOCIALE LIKE '%" & RagSocSrc & "%' " end if if trim(PIvaSrc) <> "" then SQLWHERE = SQLWHERE & " AND PARTITAIVA LIKE '%" & PIvaSrc & "%' " end if if trim(CittaSrc) <> "" then SQLWHERE = SQLWHERE & " AND CITTA LIKE '%" & CittaSrc & "%' " end if if Session("Tipo") = "Admin" then SQLStatement = "SELECT * FROM QUtenti " & SQLWHERE & " ORDER BY RAGIONESOCIALE" else SQLStatement = "SELECT * FROM QUtenti " & SQLWHERE & " AND INSERITO_DA = " & Session("IDUtente") & " ORDER BY RAGIONESOCIALE" end if Dim rstUtenti Set rstUtenti = Server.CreateObject("ADODB.Recordset") ' You can change other settings as with any RS 'rstUtenti.CursorLocation = adUseClient ' ---------------------------------------------------------- BEGIN CODE TO PAGING rstUtenti.PageSize = iPageSize rstUtenti.CacheSize = iPageSize ' ---------------------------------------------------------- END CODE TO PAGING ' Open RS rstUtenti.Open SQLStatement, conn, 3, 3 ' ---------------------------------------------------------- BEGIN CODE TO PAGING ' Get the count of the pages using the given page size iPageCount = rstUtenti.PageCount ' Check page count to prevent bombing when zero results are returned! If iPageCount = 0 Then 'Response.Write "No records found!" Else ' Move to the selected page rstUtenti.AbsolutePage = iCurrentPage End if ' Calculate iPreviousPage iNextPage values select case Action case "Stay" ' Leggo la pagina corrente la pagina prev e la next If iCurrentPage = 1 Then iPreviousPage = -1 * iPagesShown + 1 iNextPage = 1 + iPagesShown if iNextPage > iPageCount then iNextPage = iPageCount + 1 end if end if case "GoNext", "GoPrevious" ' Leggo solo la pagina corrente iPreviousPage = iCurrentPage - iPagesShown if iPreviousPage < 1 then iPreviousPage = -1 * iPagesShown + 1 end if iNextPage = iCurrentPage + iPagesShown if iNextPage > iPageCount then iNextPage = iPageCount + 1 end if end select Dim LeftCell if iPreviousPage = (-1 * iPagesShown) + 1 Then LeftCell = "" else LeftCell = "[img][/img]" end if Dim CenterCell if iPageCount > 1 then for I=iPreviousPage + iPagesShown to iNextPage - 1 if I <> CINT(iCurrentPage) then CenterCell = CenterCell & "" & i & "" else CenterCell = CenterCell & "<font face=""Arial, Helvetica, sans-serif"" size=""3"" color=""white"">" & i & "</font>" end if next else CenterCell = "" end if Dim RightCell if iNextPage = iPageCount + 1 Then RightCell = "" else RightCell = "[img][/img]" end if ' ---------------------------------------------------------- END CODE TO PAGING %>