Αρχή :: Ενότητες :: FrontPage :: Απαντήσεις     
 

Forum

ΜΗΝΥΜΑ ΛΑΘΟΥΣ - Από {p_p}

ΠΑΙΡΝΩ ΤΟ ΠΑΡΑΚΑΤΩ ΜΗΝΥΜΑ ΟΤΑΝ ΑΠΟΣΤΕΛΩ ΤΟΝ ΚΩΔΙΚΟ ΑΠΟ ΦΟΡΜΑ ΓΙΑ ΕΛΕΓΧΟ.

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0x5f4 Thread 0xc40 DBC 0xb2c5fc4 Jet'.

ΑΥΤΟ ΕΙΝΑΙ ΤΟ ΑΡΧΕΙΟ ΠΟΥ ΒΓΑΖΕΙ ΛΑΘΟΣ ΣΤΟ ΣΗΜΕΙΟ ΠΟΥ ΕΧΩ ΤΑ *****




<%
'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.Form("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 = "users"

'Create a connection odject
Set adoCon = Server.CreateObject("ADODB.Connection")

'Database connection info and driver
strCon = "DRIVER={Microsoft Access Driver (*.mdb)};uid=;pwd=letmein; 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.Form("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"tameio-polewn.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"unauthorised_user_page.htm"
%>

 


Απάντηση από:Alex

Έχεις δώσει password στην database!
strCon = "DRIVER={Microsoft Access Driver (*.mdb)};uid=;pwd=letmein; DBQ=" & Server.MapPath(strAccessDB)

Δοκίμασε με userid admin
uid=admin;

Απάντηση από:p_p

ALEX ΘΕΛΩ ΝΑ ΠΑΙΡΝΕΙ ΤΟ PASSWORD ΑΠΟ ΜΙΑ DATABASE ΑCCESS (καθε χρήστης δικο του κωδικό) - ευχαριστω

Απάντηση από:Alex

Μα εσύ έχεις δώσει password στην σύνδεση!
Έχεις κλειδώσει την database με password

Απάντηση από:p_p

ΟΠΟΤΕ ΤΙ ΑΛΛΑΖΩ ?
ΤΙ ΒΑΣΗ ή ΤΟΝ ΚΩΔΙΚΑ ?
ΑΝ ΑΛΛΑΞΩ ΚΑΤΙ ΣΤΟ ΕΝΑ ΑΛΛΑΖΩ ΚΑΙ ΣΤΟ ΑΛΛΟ? ΠΩΣ?
ΤΑ ΦΩΤΑ ΣΟΥ ΣΕ ΠΑΡΑΚΑΛΩ!

Απάντηση από:Alex

Στο κώδικα που έχεις δώσει παραπάνω ζητάς να συνδεθείς με μια access database όπου είναι κλειδωμένη με password και δίνεις το password ‘letmein’ για να την ανοίξεις!

Είναι η database κλειδωμένη;
Όταν ανοίγεις την database στο pc σου, ζητάει password;
Αν όχι τότε σβήσε αυτή τη γραμμή

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

και δώσε
Έχεις δώσει password στην database!
strCon = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath(strAccessDB)

Απάντηση από:p_p

1000000000000 ευχαριστω. Δουλεψε



tip: Διακινδυνεύστε! Όλη η ζωή είναι ένα ρίσκο . Αυτός που φτάνει πιο μακριά είναι πρόθυμος να τολμήσει . Το καράβι που πάει στα σίγουρα ποτέ δεν απομακρύνεται πολύ από την ακτή . * F5 για νέο tip

   Πίσω στην προηγούμενη σελίδα






Η Εταιρία | Web Hosting | Domain names | Web Information | Υπηρεσίες | Resellers | Υποστήριξη |
Copyright © 2007–09 4GR.NETWORKS, All rights reserved.