Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New Coder
    Join Date
    Oct 2007
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Conn.Open with workgroup mdb file

    I had an ASP page with an Access 97 database running at home. I created the mdb file on a stand alone computer and it works fine with the ASP connection string I was using.

    I brought the MDB file and the ASP page with the connection string to work to use it as an example for a project at work. I put it on our company web sever in a new folder and it work there as well.

    Now I take a database that I created at work (Access 2k), under work group conditions, and I can’t get the ASP code to connect to the database. I've used almost every connection string I can find and nothing will give me access to the file.

    >>>CON STRING 1<<<<
    Conn.Open("PROVIDER=Microsoft.Jet.OLEDB.4.0;Jet OLEDBatabase Password=MYPASSWORD;DATA SOURCE=" & Server.MapPath("/ASPTest/DBReports.mdb")) &";"

    Microsoft JET Database Engine error '80004005'

    You do not have the necessary permissions to use the 'c:\inetpub\wwwroot\ASPTest\DBReports.mdb' object. Have your system administrator or the person who created this object establish the appropriate permissions for you.

    >>>CON STRING 2<<<<

    DSNtemp="PROVIDER=Microsoft.Jet.OLEDB.3.2;DRIVER={Microsoft Access Driver (*.mdb)};USer ID=GDebacke;PWD=MYPASSWORD;DBQ=" & server.mappath("\ASPTest\DBReports.mdb")

    ADODB.Connection error '800a0e7a'

    Provider cannot be found. It may not be properly installed.


    >>>CON STRING 3<<<
    DSNtemp="PROVIDER=Microsoft.Jet.OLEDB.4.0;DRIVER={Microsoft Access Driver (*.mdb)};USer ID=GDebacke;PWD=MYPASSWORD;DBQ=" & server.mappath("\ASPTest\DBReports.mdb")

    Microsoft JET Database Engine error '80040e4d'

    Cannot start your application. The workgroup information file is missing or opened exclusively by another user.

    >>>CONSTRING 4<<<
    DSNtemp="PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=" & Server.MapPath("\ASPTest\DBReports.mdb") & ";Jet OLEDBatabase Password=MYPASSWORD;"

    Microsoft JET Database Engine error '80004005'

    You do not have the necessary permissions to use the 'c:\inetpub\wwwroot\ASPTest\DBReports.mdb' object. Have your system administrator or the person who created this object establish the appropriate permissions for you.


    >>>CON STRING 5<<<<

    DSNtemp="DRIVER={Microsoft Access Driver (*.mdb)};USer ID=GDebacke;PWD=MYPASSWORD;DBQ=" & server.mappath("\ASPTest\DBReports.mdb")

    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 0xe58 Thread 0x1150 DBC 0x16ae024 Jet'.


    I’ve tried a few others that I no longer have. I am at a loss as to why it won’t work. Any ideas?

    Greg

  • #2
    Regular Coder
    Join Date
    May 2007
    Location
    UK
    Posts
    180
    Thanks
    0
    Thanked 18 Times in 18 Posts
    It may be a file permissions thing. By default, the IUSR_xxxxx account (or is it the IWAM_xxxxx account?) is the one that tries to access your database in ASP.

    Try giving EVERYONE full control on the file to confirm my suspicion. If your page can now access (pun intented ) the database then change the permissions back. Then add IUSR_xxxxx with full control, then IWAM_xxxxx until you have the minimum permissions required to access the database.

  • #3
    New Coder
    Join Date
    Oct 2007
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Dave,

    Thanks, I'll give it a try. I considered it my be a permissions thing at the level you are talking about, but I can access the other mdb I brought from home. This is what lead me to believe it had something to do with the way the mdb was created. That is to say, I was working on a stand-alone pc when I created the first file, and in a workgroup when I created the second file. One works, one doesn't.

  • #4
    Regular Coder
    Join Date
    May 2007
    Location
    UK
    Posts
    180
    Thanks
    0
    Thanked 18 Times in 18 Posts
    All the more reason to suspect permissions.

    I once created an mdb file in c:\inetpub or c:\inetpub\wwwroot and I had no problem using it. Another time I created an mdb in My Documents and my ASP couldn't access it - even after I had moved the file to c:\inetpub (because it kept its original permissions).

  • #5
    New Coder
    Join Date
    Oct 2007
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts
    "All the more reason to suspect permissions."
    Yes, permissions, but not file or directory permissions. I'm no expert but I think Access workgroup permissions work in a different way. I've been doing some more research and found that there is an MDV file created by Access that stores workgroup information.

    "Workgroup Information Files store information for secured databases. No changes have been made to the .mdw file format for Office Access 2007. The Office Access 2007 Workgroup Manager will create .mdw files that are identical to those created in Access 2000 through Access 2003, and .mdw files created in those earlier versions can be used by Office Access 2007 databases."

  • #6
    New Coder
    Join Date
    Oct 2007
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Just in case anyone is curious, here is the solution...

    Conn.Open "Driver={Microsoft Access Driver (*.mdb)};Dbq=" & server.mappath("\relative\path\tofile.mdb") & ";SystemDB=\\unc\path\to-mdw\file.mdw;User ID=creatorsID;Password=creatorsPWD"


    It is the "SystemDB=\\unc\path\to-mdw\file.mdw" that holds the workgroup info.


  •  

    Posting Permissions

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