Group:  Microsoft Access ยป microsoft.public.access.replication
Thread: Is it possible to invoke replication from Front End ?

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

Is it possible to invoke replication from Front End ?
"Robert" <Robert[ at ]discussions.microsoft.com> 16.06.2006 08:57:33
We have an Access Database that a replica has been created by a developer
that has left.

There is different front end connected to the backend that is replicated
with each other. We would like to know would it be possible add some codes
so that end user not necessary to close the front end, open the backend and
run synchronize. Can it be done at the Front End ?

We are using Access 2000.

Thanks


Re: Is it possible to invoke replication from Front End ?
jacksonmacd <jackMACmacdo0nald[ at ]telus.net> 16.06.2006 13:12:45
If your replicas are on a single LAN, say, for occasionally-connected
notebook computers, then you should be using Direct Synchronization.
In such case, you can declare a DAO.Database object from your
frontend, and use the .Synchronize method of the database object.

On the other hand, if your replicas are remote, you should be using
Indirect synchronization, which is not exposed as a programmable
method by the DAO database object. However, Michael Kaplan's TSI
Synchronizer object *does* allow programmatic control of Indirect
synchronization. You can find it at www.trigeminal.com



On Fri, 16 Jun 2006 18:57:33 +1000, "Robert"
<Robert[ at ]discussions.microsoft.com> wrote:

[Quoted Text]
>We have an Access Database that a replica has been created by a developer
>that has left.
>
>There is different front end connected to the backend that is replicated
>with each other. We would like to know would it be possible add some codes
>so that end user not necessary to close the front end, open the backend and
>run synchronize. Can it be done at the Front End ?
>
>We are using Access 2000.
>
>Thanks
>

--
jackmacMACdonald[ at ]telusTELUS.net
remove uppercase letters for true email
http://www.geocities.com/jacksonmacd/ for info on MS Access security
Re: Is it possible to invoke replication from Front End ?
"Robert" <Robert[ at ]discussions.microsoft.com> 17.06.2006 00:46:05
Dear Jack,

The backend is in a LAN while the replica is in a laptop. I will look into
the Direct Synchronization and DAO.Database Object.

Thanks for your help.

Rob

"jacksonmacd" <jackMACmacdo0nald[ at ]telus.net> wrote in message
news:ccb592t7d9jvh3nqfo8aop8rfapjf25s6q[ at ]4ax.com...
[Quoted Text]
> If your replicas are on a single LAN, say, for occasionally-connected
> notebook computers, then you should be using Direct Synchronization.
> In such case, you can declare a DAO.Database object from your
> frontend, and use the .Synchronize method of the database object.
>
> On the other hand, if your replicas are remote, you should be using
> Indirect synchronization, which is not exposed as a programmable
> method by the DAO database object. However, Michael Kaplan's TSI
> Synchronizer object *does* allow programmatic control of Indirect
> synchronization. You can find it at www.trigeminal.com
>
>
>
> On Fri, 16 Jun 2006 18:57:33 +1000, "Robert"
> <Robert[ at ]discussions.microsoft.com> wrote:
>
>>We have an Access Database that a replica has been created by a developer
>>that has left.
>>
>>There is different front end connected to the backend that is replicated
>>with each other. We would like to know would it be possible add some
>>codes
>>so that end user not necessary to close the front end, open the backend
>>and
>>run synchronize. Can it be done at the Front End ?
>>
>>We are using Access 2000.
>>
>>Thanks
>>
>
> --
> jackmacMACdonald[ at ]telusTELUS.net
> remove uppercase letters for true email
> http://www.geocities.com/jacksonmacd/ for info on MS Access security


Re: Is it possible to invoke replication from Front End ?
"Patrick B." <newsgroup[ at ]devzoo.com> 05.09.2006 21:43:02
Robert,

Here is the code I came up with for doing just what you want to do:

Function modReplication_SyncReplicaToMaster(ReplicaPath As String,
DesignMasterPath As String)
Dim Rp As New Replica

Rp.ActiveConnection = ReplicaPath
Rp.Synchronize DesignMasterPath, , jrSyncModeDirect
Set Rp = Nothing
End Function

Then in the code behind my "Sync" button, I have this:

modReplication_SyncReplicaToMaster BEPath, DesignMasterPath

Of course you need to set the variables BEPath and DesignMasterPath,
which I set from textboxes that the user can control.

One more important thing: this code only works if you set a reference
to the appropriate library, "Microsoft Jet and Replications Objects".

Thanks!

Patrick

Robert wrote:
[Quoted Text]
> Dear Jack,
>
> The backend is in a LAN while the replica is in a laptop. I will look into
> the Direct Synchronization and DAO.Database Object.
>
> Thanks for your help.
>
> Rob
>
> "jacksonmacd" <jackMACmacdo0nald[ at ]telus.net> wrote in message
> news:ccb592t7d9jvh3nqfo8aop8rfapjf25s6q[ at ]4ax.com...
>> If your replicas are on a single LAN, say, for occasionally-connected
>> notebook computers, then you should be using Direct Synchronization.
>> In such case, you can declare a DAO.Database object from your
>> frontend, and use the .Synchronize method of the database object.
>>
>> On the other hand, if your replicas are remote, you should be using
>> Indirect synchronization, which is not exposed as a programmable
>> method by the DAO database object. However, Michael Kaplan's TSI
>> Synchronizer object *does* allow programmatic control of Indirect
>> synchronization. You can find it at www.trigeminal.com
>>
>>
>>
>> On Fri, 16 Jun 2006 18:57:33 +1000, "Robert"
>> <Robert[ at ]discussions.microsoft.com> wrote:
>>
>>> We have an Access Database that a replica has been created by a developer
>>> that has left.
>>>
>>> There is different front end connected to the backend that is replicated
>>> with each other. We would like to know would it be possible add some
>>> codes
>>> so that end user not necessary to close the front end, open the backend
>>> and
>>> run synchronize. Can it be done at the Front End ?
>>>
>>> We are using Access 2000.
>>>
>>> Thanks
>>>
>> --
>> jackmacMACdonald[ at ]telusTELUS.net
>> remove uppercase letters for true email
>> http://www.geocities.com/jacksonmacd/ for info on MS Access security
>
>
Re: Is it possible to invoke replication from Front End ?
"David W. Fenton" <XXXusenet[ at ]dfenton.com.invalid> 06.09.2006 01:55:58
"Patrick B." <newsgroup[ at ]devzoo.com> wrote in
news:OVu6ERT0GHA.328[ at ]TK2MSFTNGP06.phx.gbl:

[Quoted Text]
> One more important thing: this code only works if you set a
> reference to the appropriate library, "Microsoft Jet and
> Replications Objects".

You can do it with DAO without needing to add a reference, because
all you need is the DBEngine object (DBEngine.OpenDatabase), which
is a member of both DAO and the Access.Application object.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
Re: Is it possible to invoke replication from Front End ?
"Patrick B." <newsgroup[ at ]devzoo.com> 19.09.2006 12:27:27
David,

Just FYI, this ended up saving me. One of my client's computers we
couldn't set a reference to JRO. I quickly switched my code to use DAO.
I didn't even know that was an option before, and had I not read your
post, I'm not sure I would have been able to solve the problem.

Thanks!

Patrick

David W. Fenton wrote:
[Quoted Text]
> "Patrick B." <newsgroup[ at ]devzoo.com> wrote in
> news:OVu6ERT0GHA.328[ at ]TK2MSFTNGP06.phx.gbl:
>
>> One more important thing: this code only works if you set a
>> reference to the appropriate library, "Microsoft Jet and
>> Replications Objects".
>
> You can do it with DAO without needing to add a reference, because
> all you need is the DBEngine object (DBEngine.OpenDatabase), which
> is a member of both DAO and the Access.Application object.
>
Re: Is it possible to invoke replication from Front End ?
"David W. Fenton" <XXXusenet[ at ]dfenton.com.invalid> 19.09.2006 13:07:20
"Patrick B." <newsgroup[ at ]devzoo.com> wrote in
news:eIzB5b#2GHA.1068[ at ]TK2MSFTNGP05.phx.gbl:

[Quoted Text]
> David W. Fenton wrote:
>> "Patrick B." <newsgroup[ at ]devzoo.com> wrote in
>> news:OVu6ERT0GHA.328[ at ]TK2MSFTNGP06.phx.gbl:
>>
>>> One more important thing: this code only works if you set a
>>> reference to the appropriate library, "Microsoft Jet and
>>> Replications Objects".
>>
>> You can do it with DAO without needing to add a reference,
>> because all you need is the DBEngine object
>> (DBEngine.OpenDatabase), which is a member of both DAO and the
>> Access.Application object.
>
> Just FYI, this ended up saving me. One of my client's computers we
> couldn't set a reference to JRO. I quickly switched my code to use
> DAO. I didn't even know that was an option before, and had I not
> read your post, I'm not sure I would have been able to solve the
> problem.

You were yet another of the near victims of Microsoft's marketing
department's inability to understand its own products. ADO was never
a good idea for Jet databases and ADO necessitated the invention of
JRO. MS could have extended DAO to give full programmatic control of
replication, but instaed, since they had mistakenly deprecated DAO
in favor of ADO, they had to recreate the wheel in JRO.

In every case, DAO will *always* be superior to ADO/JRO if the
functionality is available in DAO.

Microsoft now freely admits that they made a mistake, and the
default references are set accordingly in Access 2003.

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

Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net