Compartir a través de


Package.CreatorComputerName Propiedad

Definición

Obtiene o establece el nombre del equipo en el que se creó el paquete.

public:
 property System::String ^ CreatorComputerName { 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), "CreatorComputerNameDesc")]
public string CreatorComputerName { get; set; }
[<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), "CreatorComputerNameDesc")>]
member this.CreatorComputerName : string with get, set
Public Property CreatorComputerName As String

Valor de propiedad

String

Nombre del equipo.

Atributos

Ejemplos

En el ejemplo siguiente se carga un paquete de la carpeta Samples y, a continuación, se recupera información sobre el paquete, como su CreationDate, CreatorComputerNamey CreatorName.

static void Main(string[] args)  
        {  
            // The variable pkg points to the location  
            // of the ExecuteProcess package sample   
            // that is installed with the samples.  
            string pkg = @"C:\Program Files\Microsoft SQL Server\100\Samples\Integration Services\Package Samples\ExecuteProcess Sample\ExecuteProcess\UsingExecuteProcess.dtsx";  

            Application app = new Application();  
            Package p = app.LoadPackage(pkg, null);  

            //Retrieve creation information about the package.  
            DateTime createDate = p.CreationDate;  
            String computerCreated = p.CreatorComputerName;  
            String creatorName = p.CreatorName;  

            Console.WriteLine("Package creation date = " + createDate);  
            Console.WriteLine("Creation Computer = " + computerCreated);  
            Console.WriteLine("Creator Name = " + creatorName);  
        }  
Shared  Sub Main(ByVal args() As String)  
            ' The variable pkg points to the location  
            ' of the ExecuteProcess package sample   
            ' that is installed with the samples.  
            Dim pkg As String =  "C:\Program Files\Microsoft SQL Server\100\Samples\Integration Services\Package Samples\ExecuteProcess Sample\ExecuteProcess\UsingExecuteProcess.dtsx"   

            Dim app As Application =  New Application()   
            Dim p As Package =  app.LoadPackage(pkg,Nothing)   

            'Retrieve creation information about the package.  
            Dim createDate As DateTime =  p.CreationDate   
            Dim computerCreated As String =  p.CreatorComputerName   
            Dim creatorName As String =  p.CreatorName   

            Console.WriteLine("Package creation date = " + createDate)  
            Console.WriteLine("Creation Computer = " + computerCreated)  
            Console.WriteLine("Creator Name = " + creatorName)  
End Sub  

Salida del ejemplo:

Package creation date = 5/5/2003 5:46:00 PM

Creation Computer =

Creator Name =

Se aplica a