Upgrading Replication ActiveX Control Applications
更新日期: 2005 年 12 月 5 日
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).
注意: |
---|
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
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.
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.
Recompile the project.
To upgrade a Visual C++ replication ActiveX application to SQL Server 2005
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.
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.
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.
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.
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.
Change History
Release | History |
---|---|
2005 年 12 月 5 日 |
|
请参阅
参考
Replication ActiveX Control Reference
概念
Requirements for Deploying Replication ActiveX Controls
其他资源
复制 ActiveX 控件示例
在复制拓扑中使用 SQL Server 的多个版本