Partager via


ObjectReferenceTracker.AddReference Method

This method adds a reference to a list for reference tracking.

Espace de noms: Microsoft.SqlServer.Dts.Runtime
Assembly: Microsoft.SqlServer.ManagedDTS (in microsoft.sqlserver.manageddts.dll)

Syntaxe

'Déclaration
Public Sub AddReference ( _
    objectNameOrID As String, _
    refType As DTSObjectReferenceType, _
    ByRef refListID As Integer _
)
public void AddReference (
    string objectNameOrID,
    DTSObjectReferenceType refType,
    ref int refListID
)
public:
void AddReference (
    String^ objectNameOrID, 
    DTSObjectReferenceType refType, 
    int% refListID
)
public void AddReference (
    String objectNameOrID, 
    DTSObjectReferenceType refType, 
    /** @ref */ int refListID
)
JScript ne prend pas en charge le passage d'arguments de type valeur par référence.

Paramètres

  • objectNameOrID
    The object name or ID of the object that owns the list to which you are adding a new reference for tracking.
  • refType
    The type of reference you want to track. The valid values are found in the DTSObjectReferenceType enumeration.
  • refListID
    The ID of the reference list.

Notes

This method adds a reference for the object named in the objectNameOrID parameter, with the type specified in refType, to the reference list with the given refListID. To create a list, pass in zero for refListID. Upon return, refListID will contain the ID of the newly created list, which now contains the single new entry. The returned refListID can be used in subsequent calls to add more references to the same list.

This method removes the entire reference list from the Reference Tracker system. It should be called when the object that owns a list is being destroyed. It is also useful when the object that owns the list is being refreshed, and a new list must be created. For example, in the Conditional Split transform, if the expression on an output is changed, the reference list for that expression can be destroyed, and a new list created as the new expression is parsed.

The refListID parameter is created when the list is newly generated using the AddReference method. The AddReference method returns to you a refListID, and it contains the ID of the newly created list. This returned refListID can be used in subsequent calls to add more references to the same list, remove references to the list, destroy a list, or when using the SetListInfo method.

Sécurité des threads

Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Plateformes

Plateformes de développement

Pour obtenir la liste des plateformes prises en charge, consultez Configuration matérielle et logicielle requise pour l'installation de SQL Server 2005.

Plateformes cibles

Pour obtenir la liste des plateformes prises en charge, consultez Configuration matérielle et logicielle requise pour l'installation de SQL Server 2005.

Voir aussi

Référence

ObjectReferenceTracker Class
ObjectReferenceTracker Members
Microsoft.SqlServer.Dts.Runtime Namespace