ActiveX Controls for Replication

SQL Replication


ActiveX Controls for Replication

Microsoft® ActiveX® controls allow custom applications to configure and 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.

Benefits of using ActiveX controls for replication are:

  • 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, and Microsoft Visual C++®.

  • The application can control when replication should take place. For example, you can program a command on a menu or a Web page that uses the replication ActiveX controls.

  • An application can use the ActiveX Controls status callback handlers to place a progress bar to provide feedback on the progress of the replication control.

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

  • Embedding replication controls in applications provides a way to distribute mobile applications without the complexity of Subscriber setup.

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

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

If a subscription is registered in Microsoft Windows Synchronization Manager, there is no need to embed the controls in the application. All synchronization is then controlled by this central application. Windows Synchronization Manager does not, however, allow you to specify some of the custom properties of a subscription, such as its hostname override and subscription agent settings including FTP. ActiveX Controls are useful for these administrative activities.

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