Visualizzazione dei risultati da 1 a 10 su 10
  1. #1
    Utente di HTML.it L'avatar di Grinder
    Registrato dal
    Mar 2003
    Messaggi
    1,374

    Errore "Impossibile aprire la chiave"

    Quando usavo ChiliASP questo errore non mi veniva fuori:

    Tipo di errore:
    Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
    [Microsoft][Driver ODBC Microsoft Access]Errore generale.
    Impossibile aprire la chiave 'Temporary (volatile) Jet DSN
    for process 0xb04 Thread 0xc4c DBC 0x22b6004 Jet' del
    Registro di sistema.
    /camp3000/Admin/check_user.asp, line 24

    il mio codice:
    codice:
    <%
    'Dimension variables
    Dim adoCon 		'Database Connection Variable
    Dim strCon		'Holds the Database driver and the
    path and name of the database
    Dim rsCheckUser 		'Database Recordset Variable
    Dim strAccessDB 	'Holds the Access Database Name
    Dim strSQL 		'Database query sring
    Dim strUserName 	'Holds the user name
    
    'Initalise the strUserName variable
    strUserName = Request.QueryString("txtUserName")
    
    'Check the database to see if user exsits and read in there
    password
    'Initialise the strAccessDB variable with the name of the
    Access Database
    strAccessDB = "db\users.mdb"
    
    'Create a connection odject
    Set adoCon = Server.CreateObject("ADODB.Connection")
    			 
    'Database connection info and driver
    strCon = "DRIVER={Microsoft Access Driver
    (*.mdb)};uid=;pwd=grinder050381; DBQ=" & Server.MapPath(strAccessDB)
    
    'Set an active connection to the Connection object
    adoCon.Open strCon
    
    'Create a recordset object
    Set rsCheckUser = Server.CreateObject("ADODB.Recordset")
    
    'Initalise the strSQL variable with an SQL statement to
    query the database
    strSQL = "SELECT tblUsers.Password FROM tblUsers WHERE
    tblUsers.UserID ='" & strUserName & "'"
    
    'Query the database
    rsCheckUser.Open strSQL, strCon
    
    'If the recordset finds a record for the username entered
    then read in the password for the user
    If NOT rsCheckUser.EOF Then
    	
    	'Read in the password for the user from the database
    	If (Request.QueryString("txtUserPass")) =
    rsCheckUser("Password") Then
    		
    		'If the password is correct then set the
    session variable to True
    		Session("blnIsUserGood") = True
    		
    		'Close Objects before redirecting
    		Set adoCon = Nothing
    		Set strCon = Nothing
    		Set rsCheckUser = Nothing
    		
    		'Redirect to the authorised user page and
    send the users name
    		Response.Redirect"admin.asp?name=" &
    strUserName
    	End If
    End If
    		
    'Close Objects
    Set adoCon = Nothing
    Set strCon = Nothing
    Set rsCheckUser = Nothing
    	
    'If the script is still running then the user must not be
    authorised
    Session("blnIsUserGood") = False
    
    'Redirect to the unautorised user page
    Response.Redirect"stop.htm"
    %>
    Suggerimenti?
    "Se la montagna vien da te,
    e tu non sei Maometto,
    allora scappa, potrebbe essere una frana!"

  2. #2
    Se non sbaglio puō succedere quando non si hanno i permessi sulla cartella o sul DB.

    Ah, trovato questo http://www.oscarjsweb.com/topic.asp?topid=35
    dovrebbe fare al caso tuo.

  3. #3
    Utente di HTML.it L'avatar di Grinder
    Registrato dal
    Mar 2003
    Messaggi
    1,374
    Si, ma le prove le faccio in locale ed č la stessa cartella del database principale
    "Se la montagna vien da te,
    e tu non sei Maometto,
    allora scappa, potrebbe essere una frana!"

  4. #4
    Hai controllato comunque i permessi?
    Oltre non so aiutarti

  5. #5
    Utente di HTML.it L'avatar di Grinder
    Registrato dal
    Mar 2003
    Messaggi
    1,374
    Si, e li ho. Non riesco proprio a capire
    "Se la montagna vien da te,
    e tu non sei Maometto,
    allora scappa, potrebbe essere una frana!"

  6. #6
    controlla di avere dato i permessi all'utente IUSR_tuopc

  7. #7
    Utente di HTML.it L'avatar di Grinder
    Registrato dal
    Mar 2003
    Messaggi
    1,374
    Verificati, era tutto a posto. Non capisco perchč per IIS non vada bene mentre per ChiliASP si
    "Se la montagna vien da te,
    e tu non sei Maometto,
    allora scappa, potrebbe essere una frana!"

  8. #8
    Perchč la stringa di connessione che funziona in rete non sempre funziona in locale, l'errore risiede proprio in quella....

    Nella mia macchina, le connessioni tipo:

    strCon = "DRIVER={Microsoft Access Driver
    (*.mdb)};uid=;pwd=grinder050381; DBQ=" & Server.MapPath(strAccessDB)


    le devo trasformare in:

    strCon = "DRIVER={Microsoft Access Driver
    (*.mdb)};uid=;pwd=grinder050381; DBQ=" & Server.MapPath(../strAccessDB)

    per farle funzionare, a seconda del percorso locale per trovare il db
    E' nato www.lombardiamotori.it

    www.universocase.it: il primo portale italiano di annunci immobiliari gratuiti e autogestiti!

  9. #9
    potrebbe non essere solo problema di permessi di scrittura ma anche delle variabili temporanee di windows...controlla il link che ti ha postato teorema
    Purtroppo bisogna imparare che il computer non sbaglia...fa solo quello che gli dici di fare

    www.netpolaris.it

  10. #10
    Utente di HTML.it L'avatar di Grinder
    Registrato dal
    Mar 2003
    Messaggi
    1,374
    No aspetta, mi sono espresso male. Non funziona nč in locale nč in rete, ma una volta, quando usavo ChiliASP come server locale, andava benissimo e non ho mai modificato nulla.
    "Se la montagna vien da te,
    e tu non sei Maometto,
    allora scappa, potrebbe essere una frana!"

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.