Solved

Database Replication/Sync

Posted on 2001-06-20
3
260 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
  • 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
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…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

785 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