Upgrading Replication ActiveX Control Applications

When upgrading Microsoft SQL Server 2000-based applications that use the replication ActiveX controls, you must refresh the references to these controls, and you must recompile and redeploy the project. Any references to the SQL Snapshot ActiveX Control must be removed because this control is not installed by SQL Server 2005. For information about generating a snapshot programmatically, see How to: Create the Initial Snapshot (Replication Transact-SQL Programming) and How to: Create the Initial Snapshot (RMO Programming).

Note

The Microsoft Visual C++ "include" files for the SQL Distribution Control and the SQL Merge Control provided with SQL Server 2000 are not provided with SQL Server 2005.

To upgrade a Visual Basic replication ActiveX application to SQL Server 2005

  1. Remove all project references to the Microsoft SQL Snapshot Control and all instances of the SQLSnapshot object in your code. This functionality is no longer provided for native code applications.

  2. Upgrade the existing references for the Microsoft SQL Distribution Control 8.0 and the Microsoft SQL Merge Control 8.0 to the new 9.0 version of these controls that are installed by SQL Server 2005.

  3. Recompile the project.

To upgrade a Visual C++ replication ActiveX application to SQL Server 2005

  1. Remove all project references to the Microsoft SQL Snapshot Control and all instances of the SQLSnapshot object in your code. This functionality is no longer provided for native code applications.

  2. Replace any #include directives that reference sqldistx.h, repldstx.c, sqlmergx.h, or replmrgx.c with an #import directive that references the equivalent library file (sqldistx.dll or sqlmergx.dll). You may need to apply the no_namespace attribute when using the #import directive.

  3. In SQL Server 2000, the sqldistx.h and sqlmergx.h header files defined the following constants that represented the GUID values of SQL Server 2000 controls and interfaces:

    • CLSID_SQLDistribution
    • CLSID_SQLMerge
    • IID_ISQLDistribution
    • IID_ISQLMerge
    • DIID__SQLDistributionEvents
    • DIID__SQLMergeEvents
    • LIBID_SQLDISTXLib
    • LIBID_SQLMERGXLib

    Modify your code to use the __uuidof keyword to retrieve the GUID values of the controls and interfaces, instead of relying on these included constant values.

  4. Ensure that the folder that contains the controls is included in the project library references or in the compiler command line. By default, the replication ActiveX controls are installed in C:\Program Files\Microsoft SQL Server\90\COM.

  5. Recompile the project.

Replication ActiveX Control Compatibility

The following table represents the supported configuration of replication ActiveX controls for SQL Server 2005 and SQL Server 2000 when used with instances of SQL Server 2005 and SQL Server 2000 in a replication topology.

ActiveX control version SQL Server 2005 SQL Server 2000

SQL Merge 9.0

Supported.

Supported only for Publishers and Subscribers. Not supported for SQL Server 2000 Distributors.

SQL Distribution 9.0

Supported.

Supported.*

SQL Merge 8.0

Not supported.

Supported.

SQL Distribution 8.0

Supported.

Supported.

SQL Snapshot 8.0

Not supported.

Supported.

*The IsSnapshotRequired method is not supported on SQL Server 2000 servers.

See Also

Reference

Replication ActiveX Control Reference

Concepts

Requirements for Deploying Replication ActiveX Controls

Other Resources

Replication ActiveX Controls Sample
Using Multiple Versions of SQL Server in a Replication Topology

Help and Information

Getting SQL Server 2005 Assistance

Change History

Release History

5 December 2005

New content:
  • Added more detailed information about upgrading replication ActiveX controls in a native code Visual C++ application.
Changed content:
  • Clarified the replication ActiveX control support matrix.