Pagina 1 di 2 1 2 ultimoultimo
Visualizzazione dei risultati da 1 a 10 su 12
  1. #1
    Utente di HTML.it
    Registrato dal
    Jan 2006
    Messaggi
    48

    Problema gestione utenti

    CIAO RAGAZZI HO SEMPRE BISOGNO DI VOI. HO QUESTO PROBLEMA: VOGLIO GESTIRE UNA LISTA DI UTENTI REGISTRATI E QUINDI APPROVARLI, ELIMINARLI ECC. MA OTTENGO QUESTO ERRORE:

    ADODB.Recordset error '800a0cb3'

    Current Recordset does not support bookmarks. This may be a limitation of the provider or of the selected cursortype.

    /_admin/Gestione_registrazioni.asp, line 58

    IL MIO SCRIPT E' IL SEGUENTE (SONO SU SERVER A RUBA, MA C'ENTRA QUALCOSA??):

    ' NUMERO DI UTENTI PER PAGINA
    iPageSize = 50

    If Request.QueryString("page") = "" Then
    iPageCurrent = 1
    Else
    iPageCurrent = CInt(Request.QueryString("page"))
    End If

    If Request.QueryString("order") = "" Then
    strOrderBy = "id"
    Else
    strOrderBy = Request.QueryString("order")
    End If

    ' PERCORSO DEL DATABASE
    url_DB = "driver={Microsoft Access Driver (*.mdb)};dbq=" & server.mappath("../database/shop.mdb")

    Set Conn = Server.CreateObject("ADODB.Connection")
    conn.Open url_DB

    Set RS = Server.CreateObject("ADODB.Recordset")

    ' FA LA RICHIESTA AL DATABASE
    sql = "SELECT * FROM Utenti ORDER BY " & strOrderBy & " DESC;"

    RS.Open sql, conn, adOpenKeyset
    RS.PageSize = iPageSize

    RS.CacheSize = iPageSize

    iPageCount = RS.PageCount
    If iPageCurrent > iPageCount Then iPageCurrent = iPageCount
    If iPageCurrent < 1 Then iPageCurrent = 1

    ' NESSUN UTENTE REGISTRATO -> VIENE VISUALIZZATO UN MESSAGGIO CHE INFORMA CHE NON E' REGISTRATO
    ' NEMMENO UN UTENTE!
    If iPageCount = 0 Then
    %><hr>
    <p align="center"><font size="2" face="Verdana">Nessun utente registrato!</font></p>
    <hr>
    <%
    Else

    RS.AbsolutePage = iPageCurrent
    iRecordsShown = 0

    ' SE INVECE SONO PRESENTI DEGLI UTENTI..
    %>
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
    <%
    ' VISUALIZZA L'USERNAME DELL'UTENTE
    Do While iRecordsShown < iPageSize And Not RS.EOF

    numero = numero + 1
    %>
    <tr>
    <td width="7%"><font face="Verdana" size="2"><%=numero%>.</font></td>
    <td width="172%"><font face="Verdana" size="2">"><%=RS("Username")%></font></td>
    <td width="19%"><font face="Verdana" size="2">">Cancella</font></td>
    </tr>
    <%

    iRecordsShown = iRecordsShown + 1
    RS.MoveNext
    Loop
    %>
    </table>
    <%
    End If
    RS.Close
    Set RS = Nothing
    Conn.Close
    %><center>
    <%
    ' MOSTRA IL NUMERO DELLE PAGINE,
    ' DATO CHE VERRANNO MOSTRATI
    ' IN QUESTO ESEMPIO 50 UTENTI PER PAGINA

    For x=1 to iPageCount
    %>
    <font face="Verdana" size="2">[ <%=x%> ]</font>
    <%
    Next
    %>

  2. #2
    RS.Open sql, conn, 3,3

  3. #3
    Utente di HTML.it
    Registrato dal
    Jan 2006
    Messaggi
    48

    Re: Problema gestione utenti

    Originariamente inviato da milena
    CIAO RAGAZZI HO SEMPRE BISOGNO DI VOI. HO QUESTO PROBLEMA: VOGLIO GESTIRE UNA LISTA DI UTENTI REGISTRATI E QUINDI APPROVARLI, ELIMINARLI ECC. MA OTTENGO QUESTO ERRORE:

    ADODB.Recordset error '800a0cb3'

    Current Recordset does not support bookmarks. This may be a limitation of the provider or of the selected cursortype.

    /_admin/Gestione_registrazioni.asp, line 58

    IL MIO SCRIPT E' IL SEGUENTE (SONO SU SERVER A RUBA, MA C'ENTRA QUALCOSA??):

    ' NUMERO DI UTENTI PER PAGINA
    iPageSize = 50

    If Request.QueryString("page") = "" Then
    iPageCurrent = 1
    Else
    iPageCurrent = CInt(Request.QueryString("page"))
    End If

    If Request.QueryString("order") = "" Then
    strOrderBy = "id"
    Else
    strOrderBy = Request.QueryString("order")
    End If

    ' PERCORSO DEL DATABASE
    url_DB = "driver={Microsoft Access Driver (*.mdb)};dbq=" & server.mappath("../database/shop.mdb")

    Set Conn = Server.CreateObject("ADODB.Connection")
    conn.Open url_DB

    Set RS = Server.CreateObject("ADODB.Recordset")

    ' FA LA RICHIESTA AL DATABASE
    sql = "SELECT * FROM Utenti ORDER BY " & strOrderBy & " DESC;"

    RS.Open sql, conn, adOpenKeyset
    RS.PageSize = iPageSize

    RS.CacheSize = iPageSize

    iPageCount = RS.PageCount
    If iPageCurrent > iPageCount Then iPageCurrent = iPageCount
    If iPageCurrent < 1 Then iPageCurrent = 1

    ' NESSUN UTENTE REGISTRATO -> VIENE VISUALIZZATO UN MESSAGGIO CHE INFORMA CHE NON E' REGISTRATO
    ' NEMMENO UN UTENTE!
    If iPageCount = 0 Then
    %><hr>
    <p align="center"><font size="2" face="Verdana">Nessun utente registrato!</font></p>
    <hr>
    <%
    Else

    RS.AbsolutePage = iPageCurrent
    iRecordsShown = 0

    ' SE INVECE SONO PRESENTI DEGLI UTENTI..
    %>
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
    <%
    ' VISUALIZZA L'USERNAME DELL'UTENTE
    Do While iRecordsShown < iPageSize And Not RS.EOF

    numero = numero + 1
    %>
    <tr>
    <td width="7%"><font face="Verdana" size="2"><%=numero%>.</font></td>
    <td width="172%"><font face="Verdana" size="2">"><%=RS("Username")%></font></td>
    <td width="19%"><font face="Verdana" size="2">">Cancella</font></td>
    </tr>
    <%

    iRecordsShown = iRecordsShown + 1
    RS.MoveNext
    Loop
    %>
    </table>
    <%
    End If
    RS.Close
    Set RS = Nothing
    Conn.Close
    %><center>
    <%
    ' MOSTRA IL NUMERO DELLE PAGINE,
    ' DATO CHE VERRANNO MOSTRATI
    ' IN QUESTO ESEMPIO 50 UTENTI PER PAGINA

    For x=1 to iPageCount
    %>
    <font face="Verdana" size="2">[ <%=x%> ]</font>
    <%
    Next
    %>
    L'ho fatto e mi esce l'elenco dei nomi del tipo:
    1. CERVINI
    2. RIVI
    ecc.
    ma quando clicco su di un nome per andare a prendere la pagina per apportare le modifiche o per renderlo attivo mi esce:
    ADODB.Recordset error '800a0bb9'

    Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.

  4. #4
    convalida_utente.asp deve avere un errore no?

  5. #5
    Utente di HTML.it
    Registrato dal
    Jan 2006
    Messaggi
    48
    Originariamente inviato da santino83
    convalida_utente.asp deve avere un errore no?
    Probabile...Lo script di convalida_utente.asp è:

    <%
    ' PERCORSO DEL DATABASE
    url_DB = "driver={Microsoft Access Driver (*.mdb)};dbq=" & server.mappath("../database/shop.mdb")

    Set Conn = Server.CreateObject("ADODB.Connection")
    conn.Open url_DB

    Set RecSet = Server.CreateObject("ADODB.Recordset")
    ' PRELEVA I DATI DELL'UTENTE SELEZIONATO
    SQL = "SELECT * FROM UTENTI WHERE ID = " & Request.QueryString("id") &""
    RecSet.Open SQL, Conn, adOpenStatic, adLockOptimistic


    ' CONTROLLA SE L'UTENTE ESISTE...

    IF Not RecSet.Eof Then
    %>


    <font face="Verdana" size="4">&gt; Modifica Utente</font></p>
    <form method="POST" action="Utente_DB.asp?id=<%=RecSet("id")%>">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
    <tr>
    <td width="19%"><font face="Verdana" size="2">Username:</font></td>
    <td width="81%"><input type="text" name="username" size="20" value="<%=RecSet("username")%>"></td>
    </tr>
    <tr>
    <td width="19%"><font face="Verdana" size="2">Password:</font></td>
    <td width="81%"><input type="text" name="password" size="20" value="<%=RecSet("password")%>"></td>
    </tr>
    <tr>
    <td width="19%"><font face="Verdana" size="2">E-mail:</font></td>
    <td width="81%"><input type="text" name="email" size="20" value="<%=RecSet("email")%>"></td>
    </tr>
    <tr>
    <td width="19%"><font face="Verdana" size="2">Utente Attivo/Non attivo:</font></td>
    <td width="81%"><select size="1" name="attivo">
    <option <% IF RecSet("attivo") = 1 then%>selected<%end if%> value="1">Attivo</option>
    <option <% IF RecSet("attivo") = 0 then%>selected<%end if%> value="0">Non attivo</option>
    </select></td>
    </tr>
    <tr>
    <td width="100%" colspan="2"><input type="submit" value="Modifica utente" name="B1"><input type="reset" value="Reimposta" name="B2"></td>
    </tr>
    </table>
    </form>


    <font face="Verdana" size="2">Torna alla Gestione delle Registrazioni</font></p>
    <%
    Else

    ' ALTRIMENTI... L'UTENTE NON ESISTE
    ' PORTA L'AMMINISTRATORE NELLA PAGINA
    ' PRECEDENTE...

    Response.Redirect "report.asp"

    End IF

    RecSet.Close
    Conn.Close

    Set RecSet = Nothing
    Set Conn = Nothing
    %>

  6. #6
    codice:
    SQL = "SELECT * FROM UTENTI WHERE ID = " & Request.QueryString("id")
    RecSet.Open SQL, Conn, 1,1

  7. #7
    Utente di HTML.it
    Registrato dal
    Jan 2006
    Messaggi
    48
    Originariamente inviato da santino83
    codice:
    SQL = "SELECT * FROM UTENTI WHERE ID = " & Request.QueryString("id")
    RecSet.Open SQL, Conn, 1,1
    Facendo così mi dà questo errore:
    Microsoft VBScript runtime error '800a01c2'

    Wrong number of arguments or invalid property assignment: 'Open'
    /_admin/convalida_utente.asp, line 18

  8. #8
    Originariamente inviato da milena
    Facendo così mi dà questo errore:
    Microsoft VBScript runtime error '800a01c2'

    Wrong number of arguments or invalid property assignment: 'Open'
    /_admin/convalida_utente.asp, line 18
    figo st'errore mai visto

  9. #9
    Utente di HTML.it
    Registrato dal
    Jan 2006
    Messaggi
    48
    Originariamente inviato da santino83
    figo st'errore mai visto
    ODDIO!!! E Allora non mi puoi aiutare????

  10. #10
    cioè tu dovresti ritrovarti una cosa del genere:
    codice:
    url_DB = "driver={Microsoft Access Driver (*.mdb)};dbq=" & server.mappath("../database/shop.mdb")
    
    Set Conn = Server.CreateObject("ADODB.Connection") 
    Conn.Open url_DB
    
    set RecSet=server.createObject("ADODB.recordset")
    sql="select * from utenti where id=" & request.querystring("id")
    RecSet.open sql,Conn,1,1
    che io sappia è giusta come cosa...

    edit: prova a fare:
    codice:
    set RecSet=server.createObject("ADODB.recordset")
    sql="select * from utenti where id=" & request.querystring("id")
    response.write sql
    response.end()
    RecSet.open sql,Conn,1,1

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.