none
ADO connection to Access fails on Vista due to system.mdw missing RRS feed

  • Question

  • Hi All,

     

    I've been studying a problem where one of our applications can't connect to an Access .mdb file. This application first copies a .mdb file to a specific local folder and then connects to it using this connection string:

     

    'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=<path and file name>;Jet OLEDBBig Smileatabase Locking Mode=1'

     

    This has been working fine but now fails on one specific system that runs Vista. The error message is:

     

    'The workgroup information file is missing or opened exclusively by another user. IDispatch error #3149'

     

    On this system, the workgroup information file (system.mdw) is located in c:\Users\<username>\AppData\Roaming\Microsoft\Access. A bit awkward since the application is a service and runs under the system account. For testing purposes I specified the 'Jet OLEDBTongue Tiedystem database' parameter in the connection string, using this path. A new error message now specifies that the account information is incorrect. I tried a User ID/Password [Admin/(empty)] but no luck.

     

    I also tried to set a database password, hoping that the workgroup file would not be needed but this did not work either(same error about the workgroup information file missing).

     

    The initial .mdb file was created without any security settings, no database password, no user accounts. By the way, I noticed that during database opening the system tries to open a 'c:\Windows\system32\system.mdb' file (notice the extension). Copying the system.mdw file to this location and name will go to the same next level ('Not a valid account name or password').

     

    Even if the system database specification would work it's not really a solution (since it's an unrelated user folder). Preferably I would like to open the database without any workgroup file.

     

    Any ideas how to solve this?

     

    Thanks,

     

    Ton 

    Tuesday, September 4, 2007 8:48 PM

Answers

  • I don't believe you can operate w/o a system.mdw file, even if you haven't implemented user-level security. What I would do is verify that the account under which your service is running has sufficient permissions to access this file. This account must also have full permissions to the folder where the Access database is located so that the corresponding .LDB file can be created, modified and deleted.

     

    Wednesday, September 5, 2007 1:16 PM

All replies

  • I don't believe you can operate w/o a system.mdw file, even if you haven't implemented user-level security. What I would do is verify that the account under which your service is running has sufficient permissions to access this file. This account must also have full permissions to the folder where the Access database is located so that the corresponding .LDB file can be created, modified and deleted.

     

    Wednesday, September 5, 2007 1:16 PM
  • Thanks for the reply. I realize that I need to have sufficient rights for the folder where the access .mdb is located, this part works fine. The problem for the system.mdw is that (on setup) I would have to scan all known user appdata folders to see if a system.mdw file is present (and if it is, set proper permissions for the system account). And then, it may not exist at all.

    This is not really the way to go I guess. Since it's apparently not possible to run without the system.mdw I guess I need to create/copy one myself and use that one. Are there any specifications available for the system.mdw format?

     

    Ton

    Friday, September 7, 2007 7:36 AM
  • Can't you copy the system.mdw file to the same location as your database and then specify the path to that location in your connection string?

     

    Friday, September 7, 2007 12:53 PM
  • There are several problems with that approach:

     

    1. the system.mdw may not be present at all

    2. I would still need to scan user folders (and may perhaps not even have read access)

    3. if an existing system.mdw is found I may not know a valid username and/or password (as is the case in my situation).

     

    So, I think I need to generate my own system.mdw and use that (perhaps this is what you also meant). Therefore, some specifications would be helpful. I could perhaps use some existing file, include that in my setup and copy it but I have no idea if this is always compatible.

     

    Ton

    Friday, September 7, 2007 2:04 PM