Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

Programming Replication with ActiveX Controls

SQL Server 2000

Microsoft® ActiveX® controls allow custom applications to invoke replication agent functionality. The controls support all types of subscriptions and can be monitored using SQL Server Enterprise Manager at the Distributor.

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

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.

  • An application can use a progress bar to provide feedback on the progress of the replication control.

  • An application can determine how to obtain login information (for example, hard-coded or interactive).

  • Replication controls can be embedded in applications, providing a way to distribute mobile applications without the complexity of Subscriber setup.

  • Controls can be programmed to add or drop subscriptions and create or attach databases at the Subscriber.

  • An application can be programmed to register the synchronization of a subscription in Windows Synchronization Manager.

  • The client has no dependency on SQL Server Agent, which is responsible for executing jobs in addition to replication.

  • If you start a replication agent using SQL Server Agent, other jobs can also run. If you are replicating to heterogeneous Subscribers using pull or anonymous subscriptions, SQL Server Agent is not available at the Subscriber.

  • ActiveX replication controls can be invoked from many programming environments, including Microsoft Visual Basic®, Visual Basic Scripting Edition, Java, and Microsoft Visual C++®.

If a subscription is registered in Windows Synchronization Manager, there is often no need to embed the controls in the application. All synchronization can then be controlled by this central application, if that meets the needs of your application.

For more information, see Developing Replication Applications Using ActiveX Controls.

© 2015 Microsoft