Solved

Database Replication/Sync

Posted on 2001-06-20
3
258 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
Comment Utility
try

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

Accepted Solution

by:
Charityg earned 50 total points
Comment Utility
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
Comment Utility
Charityg,

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

tcoc
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

It took me quite some time to sort out all the different properties of combo and list boxes available from Visual Basic at run-time. Not that the documentation is lacking: the help pages are quite thorough and well written. The problem was rather wh…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
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…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…

762 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now