CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2001
    Posts
    13

    Angry Error Accessing MDB file on Server. Works ok locally though. HELP!

    Hello everyone. I'm having some trouble I was hoping to get some help with. I wrote some code to access a standard MS Access 2000 database. I'm using a global DSN called OfficeTrack pointing to the K drive, our main public directory on the server. Whenever the code tries to access the database, I get this error:

    Error Type:
    Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
    [Microsoft][ODBC Microsoft Access Driver] The Microsoft Jet database engine cannot open the file '(unknown)'. It is already opened exclusively by another user, or you need permission to view its data.


    However, if I copy the database to my local C drive, and change the DSN to reflect the database on my local drive instead of the server, the whole thing works fine. Not a single problem with it.

    Does anyone have any idea what is happening or how I can fix it? I tried updating the drivers for the Jet Engine, but that didn't seem to work.

    EDIT: One more thing, is that I know the database is not currently opened exclusively or anything. There is nobody using it because I'm still working on it .

    Thanks to all.

    Bill Garrett
    www.ccex.com

  2. #2
    Join Date
    Jun 2002
    Location
    Sweden
    Posts
    136
    Your problem: You're using a DSN on YOUR machine, pointing to a resource on ANOTHER machine. This is not good.

    You want to create the System DSN entry on the network machine, the one that actually has the K drive in it physically. The server. Then you can, with some fiddling in your code, access this by a call to the servername in the query.

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured