后续版本的 Microsoft SQL Server 将删除该功能。请避免在新的开发工作中使用该功能,并着手修改当前还在使用该功能的应用程序。
The MergeSubsetFilter object represents a filter (or partition) of the data in one article based on filtered data in another article. Both articles must be part of the same merge publication.
.gif)
Methods
Properties
| 
 | 
备注
A MergeSubsetFilter object is commonly used when two tables have a primary-key-to-foreign-key relationship. If the MergeArticle object representing the primary key table has a SubsetFilterClause object defined, add a MergeSubsetFilter object (that references the primary key article) to the MergeArticle object representing the foreign key table.
With the MergeSubsetFilter object, you can:
- Add a merge filter.
- Change the properties of an existing merge filter.
To add a merge filter to a merge article
- Create a new MergeSubsetFilter object. 
- Set the Name property. 
- Set the JoinArticleName property. 
- Set the JoinFilterClause property. 
- Add the MergeSubsetFilter object to the MergeSubsetFilters collection of a connected MergeArticle object. 
To alter an existing merge filter of a merge article
- Get a MergeSubsetFilter object from the MergeSubsetFilters collection of a connected MergeArticle object. 
- Use the BeginAlter method to mark the beginning of the changes. 
- Set the MergeSubsetFilter properties to reflect the changes to the merge filter. 
- Use the DoAlter method to submit the changes to Microsoft SQL Server.