HELP! Unable to open an access database from a Visual Basic program using the OleDb adapter RRS feed

  • Question

  • The background of the problem is as follows:

    I am writing an application that opens a legacy access database application and moves data in and out of the database.  There are three files that make up the access database.  secured.mdw (security or workgroup file), Orders.mdb (contains programs and linked table references), and Orders_tbls.mdb (the actual data tables).  The application may not be modified and is currently in use on the company's networks.  The users of the access application are getting access to the application through a network share.  There is a piece of code in the application that relinks the tables if necessary between Orders and Orders_tbls.  If I copy the access database to a test machine, run the program and allow the tables to relink to the new physical location of the order_tbls.mdb.  My OleDb access code works fine.  The users of the access application get to the database via a share on their local PC's where the path is not exactly like the local hard drive path so each time a user accesses the database the orders.mdb relinks to orders_tbls.mdb on the mapped share.  Once that is done the OleDb driver reports an error that it can't find the Order_tbls.mdb file. The error message shows the share address location which doesn't exist on the server.  Even if I create an identical share the result on the server is the same.
    The connection string for this error is:

    Provider=Microsoft.Jet.OLEDB.4.0; Data Source=E:\Access Databases\AQSTest\Orders.mdb;Jet OLEDB:System Database=E:\Access Databases\AQSTest\SECURED.MDW; User Id=admin; Password=password;

    If I create an identical share on the server and point the connection string to the share, then it errors out saying it can't find the workgroup file.
    The connection string for the 2nd error is:

    Provider=Microsoft.Jet.OLEDB.4.0; Data Source=Z:\Access Databases\AQSTest\Orders.mdb;Jet OLEDB:System Database=Z:\Access Databases\AQSTest\SECURED.MDW; User Id=admin; Password=password;

    The E drive is a local hard drive, the Z drive is a share mapped to the E drive.

    Any ideas as to how to get this to work without having to change the way that the users access their old legacy application?

    Thursday, May 28, 2009 10:23 PM

All replies

  • Do the users have full permissions to the network resource where the database files are located?

    Paul ~~~~ Microsoft MVP (Visual Basic)
    Monday, June 1, 2009 3:07 PM