ScriptComponent.ReadOnlyVariables Property
Returns the collection of ReadOnlyVariables available to the component.
命名空間: Microsoft.SqlServer.Dts.Pipeline
組件: Microsoft.SqlServer.TxScript (in microsoft.sqlserver.txscript.dll)
語法
'宣告
Public ReadOnly Property ReadOnlyVariables As IDTSVariables90
public IDTSVariables90 ReadOnlyVariables { get; }
public:
property IDTSVariables90^ ReadOnlyVariables {
IDTSVariables90^ get ();
}
/** @property */
public IDTSVariables90 get_ReadOnlyVariables ()
public function get ReadOnlyVariables () : IDTSVariables90
屬性值
An IDTSVariables90 that contains the collection of ReadOnlyVariables.
備註
The Script component developer makes variables available to the Script component for read-only access by listing them in the ReadOnlyVariables 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 ReadOnlyVariables 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.
範例
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
執行緒安全性
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.
平台
開發平台
如需受支援的平台清單,請參閱<安裝 SQL Server 2005 的硬體和軟體需求>。
目標平台
如需受支援的平台清單,請參閱<安裝 SQL Server 2005 的硬體和軟體需求>。
請參閱
參考
ScriptComponent Class
ScriptComponent Members
Microsoft.SqlServer.Dts.Pipeline Namespace