> I'm in the process of developing an application where my users
> will take a replicated db out of the office on a laptop and, upon
[quoted text clipped - 10 lines]
> command, everything syncs correctly and data is transferred. My
> code seems to be goofed....
[]
> 'test network connection to a known db
> strTestDbPath =
[quoted text clipped - 8 lines]
> 'standard network location for master inspections db
> strSynchNetworkDb = "\\server1\User\HDG\db\Inspection.mdb"
...
> Set dbTestCxn = DBEngine.OpenDatabase(strTestDbPath)
...
> dbSynch.Synchronize strSynchNetworkDb, dbRepImpExpChanges
The replicas you are synching are both on the same machine, because
the names begin with "\\server1".
If you want to synch between the laptop and the server, one of the
two, either the "Set db =" or the strTestDbPath, have to be on the
laptop, usually called with a local path (C:\ etc.).

Signature
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
HGil - 21 Jun 2006 14:07 GMT
SNIP
> > 'test network connection to a known db
> > strTestDbPath =
[quoted text clipped - 23 lines]
> two, either the "Set db =" or the strTestDbPath, have to be on the
> laptop, usually called with a local path (C:\ etc.).
Thanks for the reply David.
I know that eventually the replicas will be on laptops. I was just
testing the code on the network. Why would being on the same machine
matter to the sync process?
Anyway...even if I create a replica on my local machine and have the
code reference a local C:\ path, I get the same results (or lack of
results).
When I manually sync from the design master Access asks me to close the
db before it will sync. Is this somehting I need to do in the code as
well? Also, I don't have the option to manually sync the dbs from
within the replica. Can I not initiate a sync from the replica either
manually or by code? I wouln't think that this is the case, but I
don't know anymore.
Thanks again for any insights,
HGil
David W. Fenton - 22 Jun 2006 00:50 GMT
> SNIP
>
[quoted text clipped - 31 lines]
> just testing the code on the network. Why would being on the same
> machine matter to the sync process?
Well, OK. I assumed you were synching a laptop replica with a server
replica, but any two replicas should work.
> Anyway...even if I create a replica on my local machine and have
> the code reference a local C:\ path, I get the same results (or
> lack of results).
I'm stumped.
> When I manually sync from the design master Access asks me to
> close the db before it will sync. Is this somehting I need to do
> in the code as well? Also, I don't have the option to manually
> sync the dbs from within the replica. Can I not initiate a sync
> from the replica either manually or by code? I wouln't think that
> this is the case, but I don't know anymore.
Not sure why you'd have to close the DM before synching.
I'm also not sure why a direct DAO synch wouldn't work, as it's
exactly the same method that the Access UI implements behind the
scenes.
Keep in mind that I'm assuming certain things:
1. you have an MDB that is your front end, from which you're
synching the back end that the front end's linked tables are linked
with to a different replica.
2. you need to make your database variable point to either the back
end that your front end uses, or the partner replica you want to
synch with, and the other replica will be, well, the other replica
you want to synch with.
Assuming that your front end is linked to
\\server1\user\GIS\applications\InspectionsDb\NetworkConnectionTest.m
db, and you want to synch with \\server1\User\HDG\db\Inspection.mdb,
then your code really should be working.
I suspect that something is not as you assume it to be, though.

Signature
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/

Signature
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
You don't mention it explicitly, but is your application split into
frontend and backend components? Replication is intended for backend
(tables) only.
>I'm in the process of developing an application where my users will
>take a replicated db out of the office on a laptop and, upon their
[quoted text clipped - 63 lines]
>
>HGil
--
jackmacMACdonald@telusTELUS.net
remove uppercase letters for true email
http://www.geocities.com/jacksonmacd/ for info on MS Access security