SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Member
    Join Date
    Apr 2011
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Exclamation Microsoft JET Database Engine error '80004005'

    Hi there,

    I keep getting this error when i load my asp page....

    Microsoft JET Database Engine error '80004005'

    Unspecified error


    All the permissions are set on the folders and database file and I am not using any reserved words.

    What am i missing.

    Thanks

  2. #2
    SitePoint Wizard siteguru's Avatar
    Join Date
    Oct 2002
    Location
    Scotland
    Posts
    3,609
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Does it give a line number that's causing the error? Care to show some code?
    Ian Anderson
    www.siteguru.co.uk

  3. #3
    SitePoint Member
    Join Date
    Apr 2011
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I use this for a simple guest login which will select the guest user and password.

    The error occurs where it says Conn.Open(sConnection)

    Code:
    <%
    Dim Conn
    Dim sConnection
    Dim RS
    Set Conn = Server.CreateObject("ADODB.Connection")
      sConnection = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
      "Data Source=" & ("D:\database\guests.mdb") & ";" & _
      "Persist Security Info=True"
    Conn.Open(sConnection)
    Set RS = Conn.Execute("SELECT * FROM guestUsers WHERE username ='" & Request.Form("username") & "' AND password ='" & Request.Form("password") & "'")
    
    If RS.EOF Then
    	Response.Write "<html><head><title>Incorrect username or password.</title>" & _
    			"<link href='" & strIncludesURL & "/css/stylesheet.css' type='text/css' rel='stylesheet'>" & _
    			"<link href='" & strIncludesURL & "/css/body.css' type='text/css' rel='stylesheet'>" & _
    			"<body style='margin: 3px;'></head>" & _
    			"Incorrect username or password.<br><br>Please <a href=''>click here</a> to try again." & _
    			"</body></html>"
    Else
                Response.Redirect("home.asp")
    End If
    RS.Close
    Conn.Close
    %>
    Thanks

  4. #4
    SitePoint Member
    Join Date
    Apr 2011
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It appears to be an auth issue with the IUSR account. But they the permissions set........

  5. #5
    SitePoint Addict itHighway's Avatar
    Join Date
    Jan 2008
    Location
    GUJ
    Posts
    270
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you are trying to run your website at local server then:
    - Check if the drive where website files and database is copied has NTFS file system.
    - For NTFS file system you may have to enable read/write permissions on database and any other files.
    - To enable permissions, right click on folder > security tab > Select Users ([your mechine-name]/Users) > Set permissions...
    - Once done you may have to restart your computer.

  6. #6
    SitePoint Zealot
    Join Date
    Jan 2007
    Location
    Almere, The Netherlands
    Posts
    160
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Misty_Island View Post
    and I am not using any reserved words.
    Yes you are! Although Password is not a Reserved Word when using Access, it is when you're connecting to a MDB file with Jet. Then you're dealing with a Jet Database Engine.

    The list of JET Reserved words can be found at:

    List of Microsoft Jet 4.0 reserved words

    So you need to change the fieldname or enclose it in brackets.

    But there's another problem. Are you aware of SQL injections?

    SQL injection - Wikipedia, the free encyclopedia

    The best way of preventing this is to use parameterized queries:

    Binary Booyah! | Classic ASP data access using parameterized SQL


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •