Partager via


ReplicationTables Collection

Cette fonctionnalité sera supprimée dans une prochaine version de Microsoft SQL Server. Évitez d'utiliser cette fonctionnalité dans de nouveaux travaux de développement et prévoyez de modifier les applications qui utilisent actuellement cette fonctionnalité.

The ReplicationTables collection contains ReplicationTable objects that reference the user-defined tables of a Microsoft SQL Server database.

Modèle objet SQL-DMO qui affiche l'objet en cours

Properties

Notes

SQL Server replication publications and subscriptions can be used to automate replication of user data. To simplify replication configuration when using SQL Distributed Management Objects (SQL-DMO), SQL-DMO implements the ReplicationTables and ReplicationStoredProcedures collections, which list user-defined tables and stored procedures.

With the ReplicationTables collection, you can enumerate those tables that can participate in replication as a source for article data.

When using the Item method, the ReplicationTables collection supports member identification using either name or ordinal reference syntax. For example:

Set oReplicationTable = oReplicationDatabase.oReplicationTables("[Order Details]")

Or:

Set oReplicationTable = oReplicationDatabase.oReplicationTables(3)

Additionally, when using the table name to select an object from the collection, the Item method allows owner name qualification. For example:

Set oReplicationTable = oReplicationDatabase.oReplicationTables("Orders", "dbo")