Pagina 1 di 2 1 2 ultimoultimo
Visualizzazione dei risultati da 1 a 10 su 12
  1. #1

    EDIT: problema recupero variabile server

    Salve a tutti, ho cercato tantissimo delle soluzioni in altri thread scritti, ma proprio non vuole funzionare questa connessione con query.

    Per cominciare ho il file dove ho la connessione:
    codice:
    <%
    Dim MySQLSVR, MySQLPRT, MySQLUID, MySQLPWD, MySQLDB, MySQLOPT, DB_CONNECTIONSTRING, UploadPath, CSS
    ' UPDATE THESE VALUES for MySQL *******
    MySQLSVR = "localhost"	' enter IP or hostname of MySQL server
    MySQLPRT = 3306     ' enter MySQL port (default 3306)
    MySQLUID = "username"   ' enter Username (between quotes)
    MySQLPWD = "password"   ' enter Password (between quotes)
    MySQLDB  = "database"     ' enter Active DataBase (between quotes)
    MySQLOPT = 16387    ' enter MyODBC options values (at least 16387)
    ' END OF UPDATE ***
    ' MySQL Version
    
    DB_CONNECTIONSTRING = "driver={MySQL ODBC 3.51 Driver};server="&MySQLSVR&";port="&MySQLPRT&";"_
    & "uid="&MySQLUID&";pwd="&MySQLPWD&";database="&MySQLDB&";option="&MySQLOPT&""
    
    %>
    la query che non funziona è:

    codice:
    <%
    Set rs = Server.CreateObject("ADODB.Recordset")
    sql="SELECT * FROM accesso WHERE Username ='"& utente &"'"
    rs.Open sql, DB_CONNECTIONSTRING, 3, 3
    %>
    Ho trasferito tutto da WinXp a Win Server2003 e non so cosa cavolo abbia -.-

    Errore:
    ADODB.Recordset error '800a0bb9'
    Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.

    /home.asp, line 103
    La linea dell'errore 103 è la seguente:

    rs.Open sql, DB_CONNECTIONSTRING, 3, 3

    Grazie

  2. #2
    sicuro che sia la connessione e non la query?

  3. #3
    La query funziona sul database quindi presumo sia la connessione, ma a sto punto non ne sono sicuro -.-

  4. #4
    ----------------------------------------------------
    impariamo a fare un po' di debug

    *subito* dopo la composizione della stringa SQL metti

    Response.Write "maGGica SQL...: " & sql
    Response.Flush

    poi posta quello che viene a video
    ----------------------------------------------------

  5. #5


    MaGGica SQL...: SELECT * FROM accesso WHERE Username =''
    ADODB.Recordset error '800a0bb9'

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

    /home.asp, line 108

  6. #6
    Ho capito solo ora che non mi aggancia la variabile utente che recupero così:

    sutente = Request.ServerVariables("REMOTE_USER")
    però non sò come mai

  7. #7
    RISOLTO

    Non avevo disabilitato su IIS l'accesso anonimo degli utenti

    Che testina

    Grazie ^^

  8. #8

  9. #9
    Provider error '8000ffff'

    Ora mi dà questo errore in un'latra pagina con la stess query -.-

  10. #10
    Originariamente inviato da JacK^79
    Provider error '8000ffff'

    Ora mi dà questo errore in un'latra pagina con la stess query -.-

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 © 2024 vBulletin Solutions, Inc. All rights reserved.