ConnectionManager.Description Eigenschaft

Definition

Ruft die Beschreibung des ConnectionManager-Objekts ab oder legt sie fest.

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

Eigenschaftswert

Eine Zeichenfolge, die die Beschreibung enthält, die dem Verbindungs-Manager zugewiesen wird.

Implementiert

Attribute

Beispiele

Im folgenden Codebeispiel wird ein neuer DATEI-Verbindungs-Manager erstellt und mehrere Eigenschaften festgelegt, einschließlich der Description.

using System;  
using System.Collections.Generic;  
using System.Text;  
using Microsoft.SqlServer.Dts.Runtime;  
using Microsoft.SqlServer.Dts.Tasks.FileSystemTask;  

namespace FileSystemTask_API  
{  
    class Program  
    {  
        static void Main(string[] args)  
        {  
            String sourceDir = @"C:\TestFolder";  
            Package pkg = new Package();  

            // Create a File connection manager.  
            ConnectionManager cm = pkg.Connections.Add("FILE");  
            cm.Name = "The FILE connection manager";  
            cm.Description = "My FILE connection manager";  
            cm.ConnectionString = sourceDir;  
            cm.Properties["FileUsageType"].SetValue(cm, DTSFileConnectionUsageType.FolderExists);  
        }  
    }  
}  
Imports System  
Imports System.Collections.Generic  
Imports System.Text  
Imports Microsoft.SqlServer.Dts.Runtime  
Imports Microsoft.SqlServer.Dts.Tasks.FileSystemTask  

Namespace FileSystemTask_API  
    Class Program  
        Shared  Sub Main(ByVal args() As String)  
            Dim sourceDir As String =  "C:\TestFolder"   
            Dim pkg As Package =  New Package()   

            ' Create a File connection manager.  
            Dim cm As ConnectionManager =  pkg.Connections.Add("FILE")   
            cm.Name = "The FILE connection manager"  
            cm.Description = "My FILE connection manager"  
            cm.ConnectionString = sourceDir  
            cm.Properties("FileUsageType").SetValue(cm, DTSFileConnectionUsageType.FolderExists)  
        End Sub  
    End Class  
End Namespace  

Gilt für: