views:

30

answers:

1

Hi,

I've noticed that Access 2010 (maybe earlier also) - can prepera database for replication, and is able to synchronize changes beetween specified databases.

My question is - is it possible to call this function from Visual Studio , using C# ? if yes - then how ?

+1  A: 

For a central starting point for Jet Replication, see my Jet Replication Wiki.

However, keep in mind:

  1. replication is a Jet technology, and is available only in MDB format, not in ACCDB (though you can have an ACCDB front end with tables linked to a replicated MDB back end).

  2. Jet replication works only across a networked connection, or an occasionally networked connection.

For programmatic synchronization, you can use DAO or JRO. DAO is recommended because it is Jet's native interface library, but it lacks the ability to initiate an indirect synch (a type of synch that is safe across unreliable connections, i.e., anything other than a WIRED LAN). JRO provides that, but there is virtually nothing else in JRO that is of any value.

If you're using OLEDB, then JRO is the natural choice, though.

Microsoft has effectively deprecated Jet replication for quite some time now. The preferred technology for synchronizing Access/Jet/ACE databases now is Sharepoint. Now that Sharepoint 2010 supports referential integrity and the performance problems with large lists has been eliminated, I would not recommend Jet replication except for the simplest scenario, i.e., disconnected laptop users who visit the home office and plug into the wired LAN there.

Anything else, I'd recommend against Jet replication.

David-W-Fenton
Thank you for the answer. I've also found that JRO might be a solution, but was having trouble finding implementation samples.
Martynas
am.. and in this case I'm staying with JRO, cause it's already a published and working (production) solution. So in this case I think that JRO is my only option
Martynas
DAO is a published and working solution, too, but in a C# environment, JRO is the more natural fit with OLEDB. It's not your only option, since you can use DAO, but it's the one designed to fit with ADO/OLEDB.
David-W-Fenton
I'm not sure why you'd have trouble finding samples of synchronization code -- they are all over the MS Jet Replicaton documentation.
David-W-Fenton
@David-W-Fenton: "DAO is a published and working solution, too, but in a C# environment, JRO is the more natural fit with OLEDB" -- I don't see that there's much to choose between the two, to be honest.
onedaywhen
Well, you know more about C# than I do, but it's my observation that C# programmers when working with Jet/ACE data tend to choose OLEDB, and never use DAO. I assume this is because of the MS documentation. I understand that both are COM so in that sense equal, but if you've already gained familiarity with OLEDB I see no reason to use DAO just for this purpose.
David-W-Fenton