Solved

Database Replication/Sync

Posted on 2001-06-20
3
262 Views
Last Modified: 2009-07-29
I'm trying to code a database sync, and I need to refer to the network drive where the replica resides.  The problem is that I keep getting an error saying that the path is invalid:

Private Sub cmdSynchronizeBOS_Click()

Dim dbsAutomation As Database

    Set dbsAutomation = CurrentDb
    ' Synchronize the local database with the replica on
    ' the network

    dbsAutomation.Synchronize "ServerName/Folder/Subfolder/Replica of Automation.mdb", _
        dbRepImpExpChanges

    dbsAutomation.Close

It works if I map the drive and do something like this:

dbsAutomation.Synchronize "g:/Folder/Subfolder/Replica of Automation.mdb", _
        dbRepImpExpChanges

The problem with doing that is that the g:/ drive is different user to user.

Any suggestions?

Thanks,

tcoc
0
Comment
Question by:tcoc
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 2

Expert Comment

by:Charityg
ID: 6211555
try

"\\server\Folder\Subfolder\Replica of Automation.mdb"
0
 
LVL 2

Accepted Solution

by:
Charityg earned 50 total points
ID: 6211582
I guess I should have explained my solution a little. Using a double backslash is the standard convention for refering to the server directly. I think it has something to do with going to the root and finding the path from there, but I'm not sure. I just know it works, because I use it all of the time.
0
 

Author Comment

by:tcoc
ID: 6211621
Charityg,

Thanks it works great.  It's these little things that drive you crazy.

tcoc
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question