Partager via


Classe Variable

Represents a variable on a package, task, or container. This class cannot be inherited.

Hiérarchie d'héritage

System.Object
  Microsoft.SqlServer.Dts.Runtime.DtsObject
    Microsoft.SqlServer.Dts.Runtime.Variable

Espace de noms :  Microsoft.SqlServer.Dts.Runtime
Assembly :  Microsoft.SqlServer.ManagedDTS (en Microsoft.SqlServer.ManagedDTS.dll)

Syntaxe

'Déclaration
Public NotInheritable Class Variable _
    Inherits DtsObject _
    Implements IDTSPersist, IDTSName, IDTSPropertiesProvider, IDTSPackagePath,  _
    IDTSExecutionPath, IComponent, IDisposable
'Utilisation
Dim instance As Variable
public sealed class Variable : DtsObject, 
    IDTSPersist, IDTSName, IDTSPropertiesProvider, IDTSPackagePath, IDTSExecutionPath, 
    IComponent, IDisposable
public ref class Variable sealed : public DtsObject, 
    IDTSPersist, IDTSName, IDTSPropertiesProvider, IDTSPackagePath, IDTSExecutionPath, 
    IComponent, IDisposable
[<SealedAttribute>]
type Variable =  
    class 
        inherit DtsObject 
        interface IDTSPersist 
        interface IDTSName 
        interface IDTSPropertiesProvider 
        interface IDTSPackagePath 
        interface IDTSExecutionPath 
        interface IComponent 
        interface IDisposable 
    end
public final class Variable extends DtsObject implements IDTSPersist, IDTSName, IDTSPropertiesProvider, IDTSPackagePath, IDTSExecutionPath, IComponent, IDisposable

Le type Variable expose les membres suivants.

Propriétés

  Nom Description
Propriété publique CreationName Gets the string that the runtime engine gives when it creates an instance of the Variable object and adds the object to the Variables collection. This property is read-only.
Propriété publique DataType Gets a TypeCode enumeration that describes the data type of the variable. This property is read-only.
Propriété publique Description Gets or sets the description for the variable.
Propriété publique EvaluateAsExpression Gets or sets a Boolean that indicates whether the variable contains an expression.
Propriété publique Expression Gets or sets the expression contained in a variable.
Propriété publique ID Gets the GUID assigned to the variable. This field is read-only.
Propriété publique IncludeInDebugDump Gets or sets a value that specifies whether the variable value for a user-defined variable or a system variable is included in the debug dump files.
Propriété publique Name Gets or sets the name of the variable.
Propriété publique Namespace Gets or sets the namespace that the variable belongs to.
Propriété publique Parent Gets the parent container of the Variable instance.
Propriété publique Properties Gets a collection of DtsProperty objects. This property is read-only.
Propriété publique QualifiedName Gets the fully qualified name of the variable, including the namespace. This property is read-only.
Propriété publique RaiseChangedEvent Gets or sets a Boolean that indicates if the variable has been flagged to raise the OnVariableValueChanged event when the value of the variable changes.
Propriété publique ReadOnly Gets or sets a Boolean that indicates that the variable is read-only and cannot have its value modified.
Propriété publique Site Infrastructure. Gets or sets the site of the variable.
Propriété publique SystemVariable Gets a Boolean that indicates whether the variable is a system variable. This property is read-only.
Propriété publique Value Gets or sets the value assigned to the variable.

Haut de la page

Méthodes

  Nom Description
Méthode publique Dispose This method is inherited from the IDisposable.Dispose method, which is a mechanism to explicitly tell an object to perform cleanup.
Méthode publique Equals Determines whether two object instances are equal. (hérité de DtsObject.)
Méthode publique GetExecutionPath Returns the execution path of the current Variable object.
Méthode publique GetExpression The GetExpression method is not supported on Variable objects. Use the EvaluateAsExpression property instead.
Méthode publique GetHashCode Returns the hash code for this instance. (hérité de DtsObject.)
Méthode publique GetPackagePath Returns the path of the package that the variable belongs to.
Méthode publique GetSensitiveValue Returns the sensitive variable value.
Méthode publique GetType (hérité de Object.)
Méthode publique LoadFromXML This method is not callable by your application code. Loads a package saved as .xml, use the Application.LoadPackage method.
Méthode publique SaveToXML This method is not callable by your application code. Saves a package as .xml, use the Application.SaveToXml method.
Méthode publique SetExpression The SetExpression method is not supported on Variable objects. Use the EvaluateAsExpression property instead.
Méthode publique ToString (hérité de Object.)

Haut de la page

Événements

  Nom Description
Événement public Disposed Adds an event handler to listen to the Disposed event on the variable.

Haut de la page

Notes

Variables are grouped into namespaces for disambiguation. The System namespace is created automatically for every package and contains read-only properties. The User namespace contains custom properties that you can add. You can also create a namespace of your choosing to which to add variables. This class inherits from several classes and interfaces, including two from the Visual Studio .NET Framework:

Sécurité des threads

Tous les membres publics static (Shared dans Visual Basic) de ce type sont thread-safe. Tous les membres de l'instance ne sont pas garantis comme étant thread-safe.

Voir aussi

Référence

Espace de noms Microsoft.SqlServer.Dts.Runtime