tags:

views:

267

answers:

5

Can it be done and how?

+2  A: 

You can use Merge Replication. Theres a tutorial here SQL Server Compact 3.5 How-to Tutorials (Number 5).

BTB
+4  A: 

You can also check out Sync Services for Sql Server and Compact edition. The benefit of Sync Services is that you don't need a replication server or IIS and you can also sync between compact edition databases. This method involves writing a fair bit more code and is fairly involved, but I'd recommend looking into it as a lightweight service.

lomaxx
A: 

Because of budget constraints I think it will have to beta-tester's approch,i tried following the guide and cant seem to get it working. Before I spend time getting it to work, I just confrim, Replicating between SqlServer 2005 and Compact Edition is something that can be done?

Dan
A: 

I just confrim, Replicating between SqlServer 2005 and Compact Edition is something that can be done?

Yes it can definately be done using either Merge Replication or Sync Services

lomaxx
+1  A: 

Certainly replication is possible, as is Sync Services if you're not afraid to get your hands dirty. It depends on the details of what you need:

  • Sometimes-connected application wanting to have a read-only cache: Sync Services
  • Sometimes-connected application wanting to have part or full update ability: Sync Services
  • Remote site with multiple workstations needing read/write access to data: replication if you can get a secure network connection that's stable enough, otherwise look at extending Syn Services to work with SQL Express (or full SQL Server) based on the sample here: Sync using SQL Express

If you just want a SQL CE database and you're working with a SQL 2008 server then the wizard in Visual Studio 2008 SP1 will do all the work for you, you need only add 1 line of code to it if you want bi-directional support. If you can't upgrade then it will take more work with SQL 2005, and it's only reliable if you have at least SP2.

I'm in the middle of a project that requires multiple sites to have a sub-set of data in an environment where each site may lose it's connection to the head office at times, we've managed to get Sync Services to work with SQL 2008 at the head office and SQL Express 2008 at each site with full change tracking (2008 feature) and it's working great. It does require a reasonable amount of code (C# and SQL), so we've used some pretty smart templates to help. Be aware that.

Perhaps you could refine your question with more details?

Timothy Walters