VariableDispenser Class
Accesses the Variables collection during package execution. This class cannot be inherited.
네임스페이스: Microsoft.SqlServer.Dts.Runtime
어셈블리: Microsoft.SqlServer.ManagedDTS (in microsoft.sqlserver.manageddts.dll)
구문
‘선언
Public NotInheritable Class VariableDispenser
Inherits DtsObject
public sealed class VariableDispenser : DtsObject
public ref class VariableDispenser sealed : public DtsObject
public final class VariableDispenser extends DtsObject
public final class VariableDispenser extends DtsObject
주의
업데이트된 텍스트:2005년 12월 5일
There are two scenarios for using the variable dispenser.
You want just one variable. In this scenario, call LockOneForRead or LockOneForWrite, and a collection with one element is returned.
You want several variables. In this scenario, call LockForRead and LockForWrite several times, one for each variable. This builds up two lists, one list that contains variables for reading and one list that contains variables for writing. Next, call GetVariables, which gives you a collection that contains all of the locked variables. If GetVariables succeeds, the two lists, which are the lists of variable names, not actual locks, are cleared.
To explicitly release the locks, call Unlock on the collection. This method unlocks the variables themselves. If GetVariables fails, the lists remain unchanged, and you can call GetVariables again. If you still do not succeed in obtaining the variables, call Reset to clear the lists and bring the variable dispenser back to its initial state.
The Variables collection contains a Locked property that indicates whether a variable dispenser collection of variables is locked (true) or unlocked (false). The reason to review this property is that some tasks explicitly release locks to the variables they are using, and calling Unlock twice throws an error. Therefore, you should use this property to determine whether the dispensed collection is locked before calling Unlock.
중요: |
---|
The VariableDispenser is used with the Runtime classes. If you are using data flow components (Microsoft.SqlServer.Dts.Pipeline), then you may be required to use the IDTSVariableDispenser90 instead. To know which variable dispenser to use, see the documentation for the object you are acquiring variables on, and verify the return object of the method. |
Inheritance Hierarchy
System.Object
Microsoft.SqlServer.Dts.Runtime.DtsObject
Microsoft.SqlServer.Dts.Runtime.VariableDispenser
스레드 보안
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 설치를 위한 하드웨어 및 소프트웨어 요구 사항을 참조하십시오.
참고 항목
참조
VariableDispenser Members
Microsoft.SqlServer.Dts.Runtime Namespace