Task.GetConnectionID(Connections, String) 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
연결 ID를 포함하는 문자열을 받습니다.
public:
System::String ^ GetConnectionID(Microsoft::SqlServer::Dts::Runtime::Connections ^ connections, System::String ^ nameOrID);
public string GetConnectionID(Microsoft.SqlServer.Dts.Runtime.Connections connections, string nameOrID);
member this.GetConnectionID : Microsoft.SqlServer.Dts.Runtime.Connections * string -> string
Public Function GetConnectionID (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와 연결 이름 간 변환을 할 때 유용합니다.