Task.GetConnectionName(Connections, String) 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
연결 이름을 포함하는 문자열을 얻습니다.
public:
System::String ^ GetConnectionName(Microsoft::SqlServer::Dts::Runtime::Connections ^ connections, System::String ^ nameOrID);
public string GetConnectionName(Microsoft.SqlServer.Dts.Runtime.Connections connections, string nameOrID);
member this.GetConnectionName : Microsoft.SqlServer.Dts.Runtime.Connections * string -> string
Public Function GetConnectionName (connections As Connections, nameOrID As String) As String
매개 변수
- connections
- Connections
Connections 리뷰할 컬렉션.
- nameOrID
- String
연결 ID를 반환할 수 있습니다.
반품
연결 이름을 포함하는 문자열입니다.
예제
다음 코드 예시는 작업 사용자 지정 myConnection 속성에서 연결 이름과 ID를 얻고 설정하는 메서드를 사용한 GetConnectionID 작업의 예시를 보여줍니다.
public string myConnection
{
get
{return GetConnectionName(m_connections, m_ MyConnectionName);
}
set
{m_MyConnectionName = GetConnectionID(m_connections, value);}
}
Public Property myConnection() As String
Get
Return GetConnectionName(m_connections, m_ MyConnectionName)
End Get
Set (ByVal Value As String)
m_MyConnectionName = GetConnectionID(m_connections, value)
End Set
End Property
설명
이 기능은 커스텀 작업을 작성할 때 연결 ID와 연결 이름 간 변환을 할 때 유용합니다.