IDTSName.Name Property
Gets or sets a name assigned to the object.
命名空间: Microsoft.SqlServer.Dts.Runtime
程序集: Microsoft.SqlServer.ManagedDTS (in microsoft.sqlserver.manageddts.dll)
语法
声明
Property Name As String
string Name { get; set; }
property String^ Name {
String^ get ();
void set (String^ value);
}
/** @property */
String get_Name ()
/** @property */
void set_Name (String value)
function get Name () : String
function set Name (value : String)
属性值
A String that contains the object name.
备注
This name may not be the same as the CreationName. In several run-time objects that inherit from IDTSName, the Name property is the value shown in the graphical user interface.
示例
The IDTSName class is inherited by many classes, including the Package class, through the DtsContainer class and into the EventsProvider class, which from there, it is inherited into the Package class and most other classes. The following code sample shows the IDTSName properties as used by the Package class.
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)
{
Package pkg = new Package();
// Display the properties inherited from IDTSName.
Console.WriteLine("CreationName: {0}", pkg.CreationName);
Console.WriteLine("Name: {0}", pkg.Name);
Console.WriteLine("Description: {0}", pkg.Description);
Console.WriteLine("ID: {0}", pkg.ID);
}
}
}
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 pkg As Package = New Package()
' Display the properties inherited from IDTSName.
Console.WriteLine("CreationName: {0}", pkg.CreationName)
Console.WriteLine("Name: {0}", pkg.Name)
Console.WriteLine("Description: {0}", pkg.Description)
Console.WriteLine("ID: {0}", pkg.ID)
End Sub
End Class
End Namespace
Sample Output:
CreationName: MSDTS.Package.1
Name: {8E2F8EC1-A6E8-4114-8760-0C1A72277B8C}
Description:
ID: {8E2F8EC1-A6E8-4114-8760-0C1A72277B8C}
线程安全
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 的硬件和软件要求。
请参阅
参考
IDTSName Interface
IDTSName Members
Microsoft.SqlServer.Dts.Runtime Namespace