DtsContainer.Name Property

Definition

获取或设置 DtsContainer 的名称。Gets or sets the name of the DtsContainer.

public:
 property System::String ^ Name { System::String ^ get(); void set(System::String ^ value); };
[Microsoft.SqlServer.Dts.Runtime.Localization.LocalizablePropertyCategory(typeof(Microsoft.SqlServer.Dts.Runtime.Localized), "PropertyCategoryIdentification")]
[Microsoft.SqlServer.Dts.Runtime.Localization.LocalizablePropertyDescription(typeof(Microsoft.SqlServer.Dts.Runtime.Localized), "NameDesc")]
public string Name { get; set; }
member this.Name : string with get, set
Public Property Name As String

Property Value

String

一个指示的名称的字符串 DtsContainerA String that indicates the name of the DtsContainer.

Implements

Attributes

Examples

下面的代码示例创建一个 Package ,它是从继承的类 DtsContainerThe following code example creates a Package, which is a class that inherits from DtsContainer. Package显示了多个继承属性的用法。The Package shows the use of several inherited properties.

using System;  
using System.Collections.Generic;  
using System.Text;  
using Microsoft.SqlServer.Dts.Runtime;  
  
namespace Microsoft.SqlServer.SSIS.Samples  
{  
    class Program  
    {  
        static void Main(string[] args)  
        {  
            Application app = new Application();  
            Package pkg = new Package();  
  
            // Package name must be assigned.  
            pkg.Name = "My DtsContainer inheritance test package";  
  
            // Display the values that manually assigned.  
            Console.WriteLine("Package Name: {0}", pkg.Name);  
  
            // Packages are assigned the following default values when created.  
            Console.WriteLine("Package ID:           {0}", pkg.ID);  
            Console.WriteLine("FailPackageOnFailure: {0}", pkg.FailPackageOnFailure);  
            Console.WriteLine("FailParentOnFailure:  {0}", pkg.FailParentOnFailure);  
            Console.WriteLine("Locale ID:            {0}", pkg.LocaleID);  
            Console.WriteLine("Is DefaultLocaleID?   {0}", pkg.IsDefaultLocaleID);  
            Console.WriteLine("Isolation Level:      {0}", pkg.IsolationLevel);  
            Console.WriteLine("LoggingMode:          {0}", pkg.LoggingMode);  
            Console.WriteLine("MaximumErrorCount:    {0}", pkg.MaximumErrorCount);  
            Console.WriteLine("TransactionOption:    {0}", pkg.TransactionOption);  
        }  
    }  
}  
Imports System  
Imports System.Collections.Generic  
Imports System.Text  
Imports Microsoft.SqlServer.Dts.Runtime  
  
Namespace Microsoft.SqlServer.SSIS.Samples  
    Class Program  
        Shared  Sub Main(ByVal args() As String)  
            Dim app As Application =  New Application()   
            Dim pkg As Package =  New Package()   
  
            ' Package name must be assigned.  
            pkg.Name = "My DtsContainer inheritance test package"  
  
            ' Display the values that manually assigned.  
            Console.WriteLine("Package Name: {0}", pkg.Name)  
  
            ' Packages are assigned the following default values when created.  
            Console.WriteLine("Package ID:           {0}", pkg.ID)  
            Console.WriteLine("FailPackageOnFailure: {0}", pkg.FailPackageOnFailure)  
            Console.WriteLine("FailParentOnFailure:  {0}", pkg.FailParentOnFailure)  
            Console.WriteLine("Locale ID:            {0}", pkg.LocaleID)  
            Console.WriteLine("Is DefaultLocaleID?   {0}", pkg.IsDefaultLocaleID)  
            Console.WriteLine("Isolation Level:      {0}", pkg.IsolationLevel)  
            Console.WriteLine("LoggingMode:          {0}", pkg.LoggingMode)  
            Console.WriteLine("MaximumErrorCount:    {0}", pkg.MaximumErrorCount)  
            Console.WriteLine("TransactionOption:    {0}", pkg.TransactionOption)  
        End Sub  
    End Class  
End Namespace  

示例输出:Sample Output:

包名称: My DtsContainer 继承测试包Package Name: My DtsContainer inheritance test package

包 ID: {2C2FAA96-35BA-4C5E-A39A-C5D7D30A0D79}Package ID: {2C2FAA96-35BA-4C5E-A39A-C5D7D30A0D79}

FailPackageOnFailure: FalseFailPackageOnFailure: False

FailParentOnFailure: FalseFailParentOnFailure: False

区域设置 ID:1033Locale ID: 1033

DefaultLocaleID?Is DefaultLocaleID? FalseFalse

隔离级别:可序列化Isolation Level: Serializable

LoggingMode: UseParentSettingLoggingMode: UseParentSetting

MaximumErrorCount:1MaximumErrorCount: 1

TransactionOption:支持TransactionOption: Supported

Applies to