ConnectionInfo.UITypeName 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
返回在图形用户界面中显示的连接类型的名称。 此值为只读的。
public:
property System::String ^ UITypeName { System::String ^ get(); };
public string UITypeName { get; }
member this.UITypeName : string
Public ReadOnly Property UITypeName As String
属性值
一个字符串,其中包含用户界面中显示的连接类型值。
示例
下面的代码示例创建一个 Application 对象,循环访问计算机上的默认连接,然后列出每个连接的属性。 在此示例中,该 UITypeName 示例显示为“Microsoft.DataTransformationServices.Design.SingleFileConnectionManagerUI, Microsoft.DataTransformationServices.Design, Version=10.0.000.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91”。
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.SqlServer.Dts.Runtime;
namespace ConnInfoTest
{
class Program
{
static void Main(string[] args)
{
Application dtsApplication = new Application();
ConnectionInfos connectionInfos = dtsApplication.ConnectionInfos;
foreach (ConnectionInfo connInfo in connectionInfos)
{
Console.WriteLine(connInfo.ConnectionContact);
Console.WriteLine(connInfo.ConnectionType);
Console.WriteLine(connInfo.CreationName);
Console.WriteLine(connInfo.Description);
Console.WriteLine(connInfo.FileName);
//Console.WriteLine(connInfo.FileNameVersionString);
Console.WriteLine(connInfo.IconFile);
Console.WriteLine(connInfo.IconResource);
Console.WriteLine(connInfo.ID);
Console.WriteLine(connInfo.Name);
Console.WriteLine(connInfo.UITypeName);
}
}
}
}
Imports System
Imports System.Collections.Generic
Imports System.Text
Imports Microsoft.SqlServer.Dts.Runtime
Namespace ConnInfoTest
Class Program
Shared Sub Main(ByVal args() As String)
Dim dtsApplication As Application = New Application()
Dim connectionInfos As ConnectionInfos = dtsApplication.ConnectionInfos
Dim connInfo As ConnectionInfo
For Each connInfo In connectionInfos
Console.WriteLine(connInfo.ConnectionContact)
Console.WriteLine(connInfo.ConnectionType)
Console.WriteLine(connInfo.CreationName)
Console.WriteLine(connInfo.Description)
Console.WriteLine(connInfo.FileName)
'Console.WriteLine(connInfo.FileNameVersionString)
Console.WriteLine(connInfo.IconFile)
Console.WriteLine(connInfo.IconResource)
Console.WriteLine(connInfo.ID)
Console.WriteLine(connInfo.Name)
Console.WriteLine(connInfo.UITypeName)
Next
End Sub
End Class
End Namespace
示例输出:
Microsoft Corporation
FILE
DTS.ConnectionManagerFile.1
Connection Manager for Files
C:\Program Files\Microsoft SQL Server\100\DTS\Binn\DtsConn.dll
C:\Program Files\Microsoft SQL Server\100\DTS\Binn\DtsConn.dll
0
{41F5EFE4-E91A-4EB0-BF10-D40FD48B3C03}
DTS Connection Manager for Files
Microsoft.DataTransformationServices.Design.SingleFileConnectionManagerUI,
Microsoft.DataTransformationServices.Design, Version=10.0.000.0,
Culture=neutral, PublicKeyToken=89845dcd8080cc91