ReadWriteVariables Propiedad
Returns the collection of ReadWriteVariables available to the component.
Espacio de nombres: Microsoft.SqlServer.Dts.Pipeline
Ensamblado: Microsoft.SqlServer.TxScript (en Microsoft.SqlServer.TxScript.dll)
Sintaxis
'Declaración
Public ReadOnly Property ReadWriteVariables As IDTSVariables100
Get
'Uso
Dim instance As ScriptComponent
Dim value As IDTSVariables100
value = instance.ReadWriteVariables
public IDTSVariables100 ReadWriteVariables { get; }
public:
property IDTSVariables100^ ReadWriteVariables {
IDTSVariables100^ get ();
}
member ReadWriteVariables : IDTSVariables100
function get ReadWriteVariables () : IDTSVariables100
Valor de la propiedad
Tipo: Microsoft.SqlServer.Dts.Runtime.Wrapper. . :: . .IDTSVariables100
An IDTSVariables100 that contains the collection of ReadWriteVariables.
Importante |
---|
The collection of ReadWriteVariables is only available in the PostExecute method. |
Notas
The Script component developer makes variables available to the Script component for read/write access by listing them in the ReadWriteVariables field in the Script Transformation Component Editor.
The Script component developer does not use the ScriptComponent class directly, but indirectly, by coding the methods and properties of the ScriptMain class, which inherits from ScriptComponent through the UserComponent class.
The developer does not have to use the ReadWriteVariables property, because the ScriptMain class provides the Variables property for convenient access to both read-only and read/write variables through a single property. The Variables property is a property of the autogenerated UserComponent base class, not of the ScriptComponent class.
Ejemplos
The following code sample demonstrates how the Script component developer might use the ReadOnlyVariables and ReadWriteVariables properties.
Dim localInteger As Integer
Dim localString As String
If Me.ReadOnlyVariables.Contains("MyIntegerVariable") Then
localInteger = CType(Me.ReadOnlyVariables("MyIntegerVariable").Value, Integer)
End If
If Me.ReadWriteVariables.Contains("MyStringVariable") Then
Me.ReadWriteVariables("MyStringVariable").Value = localString
End If
Vea también