Previous Next

Thread: Access DB connection Error

Last post 06-22-2008 6:14 PM by PresMech. 3 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (4 items)

Sort Posts:

  • 06-17-2008, 6:30 PM

    • ShotoCon
    • Not Ranked
    • Joined on 06-17-2008, 10:11 PM
    • Posts 2
    • ShotoCon

    Access DB connection Error

    Hi

    I developed a piece of software on my old machine using IIS on Server 2003 (Virtual PC Platform) and have moved it to my new machine to play with.  Unfortunately, MSVPC not installable on Vista so using IIS 7.  Although I am able to display ASP pages, I am not able to process any information from the access databaes Im using in the back end.

    Original message being returned was along these lines:

                Problem occured whilst processing URL. Please contact System administrator

    Followed advice in other threads on this forum and turned off friendly error messages, this was then returned:

                Microsoft OLE DB Provider for ODBC Drivers error '80004005'

                [Microsoft][ODBC Microsoft Access Driver] Disk or network error.

                /quizCreate.asp, line 40

    The code line it is refering to is of course the db connection opening, so here is the code and all lines before pertaining to it:

                accessDb = "eBug.mdb"

                myDSN = "DRIVER={Microsoft Access Driver (*.mdb)};"
                myDSN = myDSN & "DBQ=" & server.mappath(accessDb)

                Set dbConnection = Server.CreateObject("ADODB.Connection")
                dbConnection.Open myDSN -
    this is line 40

    Figured that it was because I was using an Access 2003 database and only have Office (including Access) 2007 on this machine. (is this assumption correct???)

    Downloaded & installed the Access Database Connection stuff from the microsoft website, saved the original db as an Access 2007 DB and changed the connection settings to this:

                accessDb = "eBug.acccdb"

                myDSN ="Provider = Microsoft.ACE.OLEDB.12.0;"
                myDSN = myDSN & "Data Source = " & Server.mappath(accessDb)

                Set dbConnection = Server.CreateObject("ADODB.Connection")
                dbConnection.Open myDSN

    New error message now:

                Microsoft Office Access Database Engine error '80004005'

                Unspecified error

               /destroyDB.asp, line 31

    Dont worry that its in a different file, all my files were using the same connection settings to the same database, I am only using this one as an example as it is the one open at this time. 

    Every user on the machine has full control to this folder, have even run the grant user access command prompts posted in other threads.

    Still have no idea why I cannot access information in the database.  If you need any more information please let me know and ill happily post it, really hope someone can help me out with this.

     
    BTW - was I correct in having to upgrade the DB to Access 2007 one, would be really really handy if i didnt have to and could still use 2003 (even if i dont have office 2003 installed) as a lot of my old projects that use access as their DB are configured to access a 2003 DB using the first method shown here.

    Cheers

  • 06-18-2008, 6:42 AM In reply to

    • Rovastar
    • Top 10 Contributor
    • Joined on 03-13-2008, 2:00 PM
    • London, UK
    • Posts 515
    • Rovastar

    Re: Access DB connection Error

    See here:

     http://www.connectionstrings.com/

    Does the ODBC work all ok?

    Also a simple google of the error number (type '80004005' into google) gives more information on these errors.

    here is one example.

    http://tutorials.aspfaq.com/8000xxxxx-errors/80004005-errors.html

    and here is a snippet from that page:

    =======================
    Microsoft JET Database Engine error '80004005' 
    Unspecified error 
    Again, IUSR_<machineName> must have read and write permissions not only on the MDB file, but also on the folder in which it resides, and in some cases the system %TEMP% folder. See Article #2154 and KB #315456 for more information. If you are trying to access a network drive, see Article #2168 for information on setting up IUSR_<machineName> to connect to an Access database via a UNC share. You should also check out Article #2142 for information on opening Access in the correct mode (e.g. adModeReadWrite). 
     
    There are certain situations where you will need to set up permissions for the IWAM_<machineName> user as well. Specifically, the C:\document and settings\%domainname%\IWAM_localmachine\local settings\temp folder. Thanks to Sylvain Paquin for pointing this out to us! 
     
    If you are not using anonymous access, but rather Windows Authentication, you want to be sure that all potential users are in a Windows group that has sufficient privileges on the folder on the web site where the MDB files resides. You might have to update individual permissions systematically if you are unable to do so via group membership. 
     
    If you are getting "unspecified error" then try running the IIS site in its own memory space or, if it is already doing so, returning it to the normal memory pool. Another possibility is the symptom described in KB #225042
     
    Finally, Access can produce the "unspecified error" message if you use reserved words anywhere in your SQL statement (see Article #2080 for a list of reserved words). 
    ====================== 

    Try all the suggestions in the links and from google for the error and let us know how you get on.

    Most overused word in IT is 'should' as in 'That should work!?!'
  • 06-21-2008, 3:14 PM In reply to

    • ShotoCon
    • Not Ranked
    • Joined on 06-17-2008, 10:11 PM
    • Posts 2
    • ShotoCon

    Re: Access DB connection Error

     HI There,

     Have set IIS_IUSR to have full control over that folder, (checked through MANY an article and tutorial on how to set this to make sure I had set the NTFS file permissions correctly as I couldnt see anything in IIS itself to change the permissions) and doesnt change a thing unfortunately.

     Cant be a Access reserve word issue because at present the ASP code isnt even getting that far on the page, the SQL script to be executed isnt until after I do some verification, the line its pointing out to me is where it actually opens the conenction to the database, BEFORE the verification (verification is just to determine WHICH SQL line to execute).  Have tried several different ways to connect to the DB and not one seems to be working, though some different errors being thrown up, one of which is

    Disk or Network error

    (hope that one wasnt in my original post, dont want to be repeating myself) still giving the same error code of 80004005 - will keep trawling through the google results and see what I can come up with though.

     Thanks for the help, especially that connectionstrings.com page, thats dead dead handy!!!

    ShotoCon 

  • 06-22-2008, 6:14 PM In reply to

    • PresMech
    • Not Ranked
    • Joined on 06-22-2008, 5:32 PM
    • Posts 1
    • PresMech

    Re: Access DB connection Error

    Hello,

    I spent many hours / days myself trying to get a simple ASP page to connect with Access. I tried all the suggestions on permissions settings I read and nothing seemed to work. Finally I tried changing the Authentication settings from the IIS manager. I simply clicked on Authentication, then selected Anonymous Authentication and then clicked Edit. From there I changed Anonymous user identity from Specific user:, which was IUSR, to Application pool identity. Clicked Ok, restarted the webserver and suddenly everything worked fine.

     I don't know if I had changed that to IUSR at some point in my testing but I don't think so, anyway making that change has solved the problem for me.

    BTW, I'm using Vista 64 Ultimate

    Hope this helps and good luck.

    IIS7 SetUp

Page 1 of 1 (4 items)
Page view counter