다음을 통해 공유


ScriptComponent.ReadOnlyVariables 속성

Returns the collection of ReadOnlyVariables available to the component.

네임스페이스:  Microsoft.SqlServer.Dts.Pipeline
어셈블리:  Microsoft.SqlServer.TxScript(Microsoft.SqlServer.TxScript.dll)

구문

‘선언
Public ReadOnly Property ReadOnlyVariables As IDTSVariables100 
    Get
‘사용 방법
Dim instance As ScriptComponent 
Dim value As IDTSVariables100 

value = instance.ReadOnlyVariables
public IDTSVariables100 ReadOnlyVariables { get; }
public:
property IDTSVariables100^ ReadOnlyVariables {
    IDTSVariables100^ get ();
}
member ReadOnlyVariables : IDTSVariables100
function get ReadOnlyVariables () : IDTSVariables100

속성 값

유형: Microsoft.SqlServer.Dts.Runtime.Wrapper.IDTSVariables100
An IDTSVariables100 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

참고 항목

참조

ScriptComponent 클래스

Microsoft.SqlServer.Dts.Pipeline 네임스페이스