Jaa


Programming Replication Using ActiveX Controls

Microsoft ActiveX controls allow your native code applications to invoke replication agent functionality. The controls support all types of subscriptions and can be monitored using SQL Server Management Studio at the Distributor. Similar functionality is provided for managed code applications using Replication Management Objects (RMO). For more information, see Synchronizing Subscriptions (RMO Programming).

Programmers can use ActiveX controls for replication, similar to any standard built-in control. The controls provided are the SQL Distribution control, and the SQL Merge control.

Note

Support for the SQL Snapshot control has been dropped. You can create and manage snapshots using Management Studio or programmatically using replication stored procedures. For more information, see How to: Create the Initial Snapshot (Replication Transact-SQL Programming).

The following list describes the benefits of using ActiveX controls for replication:

  • Replication can be part of your application intrinsically. For example, you can place a Synchronize Now command on a menu that controls when a specified agent associated with the type of replication you are using runs.
  • Replication controls can be embedded in applications, providing a way to distribute mobile applications without the complexity of Subscriber setup.
  • Clients using the controls have no dependency on SQL Server Agent.
  • Controls can be programmed to add or drop subscriptions at the Subscriber.
  • If you start a replication agent using SQL Server Agent, other jobs can also run. If you are replicating to non-SQL Server Subscribers using pull or anonymous subscriptions, SQL Server Agent is not available at the Subscriber.

ActiveX replication controls can be invoked from many native programming environments, including Microsoft Visual Basic and Microsoft Visual C++.

The ActiveX replication controls provided are:

  • SQL Distribution control - provides access to distribution agent functionalities.
  • SQL Merge control - provides access to merge agent functionality.
  • SQL Error control - provides error handling functionality for the previous controls.

See Also

Reference

Replication ActiveX Control Reference

Concepts

Requirements for Using Replication ActiveX Controls in Development Environments

Help and Information

Getting SQL Server 2005 Assistance