Synchronize a Merge Pull Subscription (RMO Programming)

This example demonstrates how to synchronize a Merge pull subscription in SQL Server Express using Replication Management Objects (RMO). This sample was built using Visual Studio 2010.

C# (789.5 KB)
5 Star
2,969 times
Add to favorites
E-mail Twitter Digg Facebook
Sign in to ask a question

  • RMO Programming Example for SQL Server 2012
    1 Posts | Last post February 24, 2015
    • Hi, we have the exact code as your example working fine against SQL Server 2008 R2.
      We have now upgraded to SQL Server 2012 but your example does not work.
      When building in x64, the exception is: 
      Could not load file or assembly 'Microsoft.SqlServer.Replication, Version=, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. An attempt was made to load a program with an incorrect format.
      When building in x86, the exception is:
      "Class not registered"
      Can you provide please the same example but with the updated DLLs so it works with SQL 2012?
      I have already tried with Replication and Rmo DLLs from C:\Program Files\Microsoft SQL Server\110\SDK\Assemblies  with the same results
      Thanks in advance!
  • RMO MergeSubscription SQL 2012 Express
    1 Posts | Last post January 31, 2015
    • Hi Team,
      I am using the exact code to Synchronize a Merge Pull Subscription.
      Everything works fine on my local system. But when I deployed my application to a machine where SQL Server Express 2012 is already installed, I do not get any error but it fails at following line.
      subscription = new MergeSubscription();
      Please note I have used following dll versions:
      Microsoft.SqlServer.ConnectionInfo -10.50.2500.0
      Microsoft.SqlServer.Replication - 10.50.2500.0
      Microsoft.SqlServer.Rmo - 10.50.1600.1
      Please help me to resolve this issue. Thanks in advance
  • RMO for SQL 2008 R2 and SQL 2005 (and SQL 2012)
    1 Posts | Last post December 04, 2013
    • I have a similar situation as Geoff.  We have a .NET application that works for SQL 2008R2 OR SQL 2005 (by switching the RMO, Replication, ... DLL references from version 10 to 9 and vice versa).  Is there a solution to have one set of DLLs included in the .NET application to support different versions of SQL Server?
  • RMO for Sql 2012 and Sql 2008 R2
    1 Posts | Last post August 29, 2013
    • We have a solution for Sql 2008 R2 Express, but it does not work with Sql 2012 Express.  The dll seem to not be compatible.  Is there a solution that will work for both?   
  • RMO Programming Example for SQL Server 2012
    2 Posts | Last post June 11, 2013
    • I might be out. Is there any RMO programming examples for SQL Server 2012? 
      It seems to me also that MS has not been published any updates for Sync Framework since 2011.  By any chance if you know can SQL Data Sync replace it?
      Many thanks,
    • Hi John,
      I can provide some SQL Server 2012 RMO programming examples if you would like.  What specifically are you needing?