Partager via


PipelineComponent.VariableDispenser Property

Gets the IDTSVariableDispenser90 of the data flow component. This property is not CLS-compliant.

Espace de noms: Microsoft.SqlServer.Dts.Pipeline
Assembly: Microsoft.SqlServer.PipelineHost (in microsoft.sqlserver.pipelinehost.dll)

Syntaxe

'Déclaration
<CLSCompliantAttribute(False)> _
Public ReadOnly Property VariableDispenser As IDTSVariableDispenser90
[CLSCompliantAttribute(false)] 
public IDTSVariableDispenser90 VariableDispenser { get; }
[CLSCompliantAttribute(false)] 
public:
property IDTSVariableDispenser90^ VariableDispenser {
    IDTSVariableDispenser90^ get ();
}
/** @property */
public IDTSVariableDispenser90 get_VariableDispenser ()
public function get VariableDispenser () : IDTSVariableDispenser90

Valeur de propriété

The IDTSVariableDispenser90 object provided to the component.

Notes

The VariableDispenser is used to read and write variables in the package that contains the component. Before reading or writing a variable, it must be locked using one of the following methods; LockForRead, LockForWrite, LockOneForRead, or LockOneForWrite. After the variables are locked using the dispenser, they are available through the IDTSVariables90 interface.

Exemple

The following example demonstrates how to use the VariableDispenser to lock a single variable, and multiple variables.

// Lock two variables, and then retrieve them by calling GetVariables.
IDTSVariables90 variables = null;

VariableDispenser.LockForRead("variable1");
VariableDispenser.LockForRead("variable2");
VariableDispenser.GetVariables(ref variables);

object variable1 = variables[0].Value;
object variable2 = variables[1].Value;

// Retrieve a single variable.
IDTSVariables90 variables = null;
VariableDispenser.LockOneForRead("variable1", ref variables);

object variable1 = variables[0].Value;
' Lock two variables, and then retrieve them by calling GetVariables.
Dim variables As IDTSVariables90 = Nothing 
VariableDispenser.LockForRead("variable1") 
VariableDispenser.LockForRead("variable2") 
VariableDispenser.GetVariables(variables) 
Dim variable1 As Object = variables(0).Value 
Dim variable2 As Object = variables(1).Value 
Dim variables As IDTSVariables90 = Nothing 
VariableDispenser.LockOneForRead("variable1", variables) 
Dim variable1 As Object = variables(0).Value

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

PipelineComponent Class
PipelineComponent Members
Microsoft.SqlServer.Dts.Pipeline Namespace