ForEachVariableMapping.CreationName Propriété
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Retourne la chaîne utilisée par le runtime pour créer une instance de l’objet et l’ajouter à sa collection. Cette propriété est en lecture seule.
public:
property System::String ^ CreationName { System::String ^ get(); };
[Microsoft.SqlServer.Dts.Runtime.Localization.LocalizablePropertyDescription(typeof(Microsoft.SqlServer.Dts.Runtime.Localized), "CreationNameDesc")]
public string CreationName { get; }
[<Microsoft.SqlServer.Dts.Runtime.Localization.LocalizablePropertyDescription(typeof(Microsoft.SqlServer.Dts.Runtime.Localized), "CreationNameDesc")>]
member this.CreationName : string
Public ReadOnly Property CreationName As String
Valeur de propriété
Chaîne qui contient le nom. Il peut s'agir du nom complet de l'assembly (pour les assemblys managés), ou du PROGID ou du CLSID (pour les DLL COM).
Implémente
- Attributs
Exemples
L’exemple de code suivant crée un ForEachVariableMapping, définit les propriétés en lecture-écriture, affiche les propriétés en lecture seule et configure un mappage à l’aide des VariableName propriétés et ValueIndex des propriétés.
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.SqlServer.Dts.Runtime;
using Microsoft.SqlServer.Dts.Runtime.Enumerators;
using Microsoft.SqlServer.Dts.Runtime.Enumerators.Item;
namespace Microsoft.SqlServer.SSIS.Samples
{
class Program
{
public static void Main()
{
// Create the new application and package.
Application app = new Application();
Package package = new Package();
// Create ForEachLoop task
Executables executables = package.Executables;
ForEachLoop forEachLoop = executables.Add("STOCK:FOREACHLOOP") as ForEachLoop;
// Create a VariableMappings and VariableMapping objects.
ForEachVariableMappings forEachVariableMappings = forEachLoop.VariableMappings;
ForEachVariableMapping forEachVariableMapping = forEachVariableMappings.Add();
// Set the properties.
forEachVariableMapping.Description = "My ForEach Variable Mapping";
forEachVariableMapping.Name = "My Name is ForEachVariableMapping";
// View the read-only properties. CreationName can be blank.
Console.WriteLine("ID: {0}", forEachVariableMapping.ID);
Console.WriteLine("CreationName: {0}", forEachVariableMapping.CreationName);
// Create a mapping between the variable and its value.
forEachVariableMapping.VariableName = @"Id";
forEachVariableMapping.ValueIndex = 0;
// Add other tasks to ForEachLoop container.
//...
// Run the package when the rest of the code is finished.
DTSExecResult status = package.Execute();
}
}
}
Imports System
Imports System.Collections.Generic
Imports System.Text
Imports Microsoft.SqlServer.Dts.Runtime
Imports Microsoft.SqlServer.Dts.Runtime.Enumerators
Imports Microsoft.SqlServer.Dts.Runtime.Enumerators.Item
Namespace Microsoft.SqlServer.SSIS.Samples
Class Program
Public Shared Sub Main()
' Create the new application and package.
Dim app As New Application()
Dim package As New Package()
' Create ForEachLoop task
Dim executables As Executables = package.Executables
Dim forEachLoop As ForEachLoop = CType(executables.Add("STOCK:FOREACHLOOP"), ForEachLoop)
' Create a VariableMappings and VariableMapping objects.
Dim forEachVariableMappings As ForEachVariableMappings = forEachLoop.VariableMappings
Dim forEachVariableMapping As ForEachVariableMapping = forEachVariableMappings.Add()
' Set the properties.
forEachVariableMapping.Description = "My ForEach Variable Mapping"
forEachVariableMapping.Name = "My Name is ForEachVariableMapping"
' View the read-only properties. CreationName can be blank.
Console.WriteLine("ID: {0}", forEachVariableMapping.ID)
Console.WriteLine("CreationName: {0}", forEachVariableMapping.CreationName)
' Create a mapping between the variable and its value.
forEachVariableMapping.VariableName = "Id"
forEachVariableMapping.ValueIndex = 0
Console.WriteLine()
' Add other tasks to ForEachLoop container.
'...
' Run the package when the rest of the code is finished.
Dim status As DTSExecResult = package.Execute()
End Sub 'Main
End Class 'Program
End Namespace 'Microsoft.SqlServer.SSIS.Samples
Exemple de sortie :
ID : {DDCF34B7-853F-4013-B924-93D1A00DEC3F}
CreationName :