다음을 통해 공유


ConnectionManager.CreationName Property

Returns the string that is used by the runtime to create an instance of the ConnectionManager object and to add the object to the Connections collection. This property is read-only.

네임스페이스: Microsoft.SqlServer.Dts.Runtime
어셈블리: Microsoft.SqlServer.ManagedDTS (in microsoft.sqlserver.manageddts.dll)

구문

‘선언
Public ReadOnly Property CreationName As String
public string CreationName { get; }
public:
virtual property String^ CreationName {
    String^ get () sealed;
}
/** @property */
public final String get_CreationName ()
public final function get CreationName () : String

속성 값

A String that contains the connection manager name. The name may be the fully qualified assembly name (for managed assemblies), it may be the ProgID or CLSID (for COM DLLs), or it may be one of the STOCK monikers used to create the connection manager for a file.

주의

For more information, see 연결 관리자.

The following code example creates a new FILE connection manager and displays the CreationName assigned to it by the runtime.

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);
            Console.WriteLine("CreationName:  {0}", cm.CreationName);
        }
    }
}
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)
            Console.WriteLine("CreationName:  {0}", cm.CreationName)
        End Sub
    End Class
End Namespace

Sample Output:

CreationName: FILE

스레드 보안

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 설치를 위한 하드웨어 및 소프트웨어 요구 사항을 참조하십시오.

참고 항목

참조

ConnectionManager Class
ConnectionManager Members
Microsoft.SqlServer.Dts.Runtime Namespace