DBProviderInfo.ProviderType プロパティ

プロバイダーが変換元プロバイダーなのか変換先プロバイダーなのかという観点で、プロバイダーの種類を示す DTSProviderType 列挙を返します。 このフィールドは読み取り専用です。

名前空間:  Microsoft.SqlServer.Dts.Runtime
アセンブリ:  Microsoft.SqlServer.ManagedDTS (Microsoft.SqlServer.ManagedDTS.dll)

構文

'宣言
Public ReadOnly Property ProviderType As DTSProviderType 
    Get
'使用
Dim instance As DBProviderInfo 
Dim value As DTSProviderType 

value = instance.ProviderType
public DTSProviderType ProviderType { get; }
public:
property DTSProviderType ProviderType {
    DTSProviderType get ();
}
member ProviderType : DTSProviderType
function get ProviderType () : DTSProviderType

プロパティ値

型: Microsoft.SqlServer.Dts.Runtime.DTSProviderType
DTSProviderType 列挙です。

使用例

次の例では、コンピューターで使用可能なデータベース プロバイダーのプロパティを列挙します。

namespace dbproviderinfo
{
    class Program
    {
        static void Main(string[] args)
        {
            Application app = new Application();
            DBProviderInfos dbis = app.DBProviderInfos;
            foreach (DBProviderInfo dbi in dbis)
            {
                Console.WriteLine("Description = {0}, Name = {1}, ParseName = {2}", dbi.Description, dbi.Name, dbi.ParseName);
                Console.WriteLine("ProviderSubType ={0}, ProviderType = {1}", dbi.ProviderSubType, dbi.ProviderType);
                Console.WriteLine("SupportsNullColumns = {0}, UseFullTableName = {1}", dbi.SupportsNullColumns, dbi.UseFullTableName);
            }
        }
    }
}
Namespace dbproviderinfo
    Class Program
        Shared  Sub Main(ByVal args() As String)
            Dim app As Application =  New Application() 
            Dim dbis As DBProviderInfos =  app.DBProviderInfos 
            Dim dbi As DBProviderInfo
            For Each dbi In dbis
                Console.WriteLine("Description = {0}, Name = {1}, ParseName = {2}", dbi.Description, dbi.Name, dbi.ParseName)
                Console.WriteLine("ProviderSubType ={0}, ProviderType = {1}", dbi.ProviderSubType, dbi.ProviderType)
                Console.WriteLine("SupportsNullColumns = {0}, UseFullTableName = {1}", dbi.SupportsNullColumns, dbi.UseFullTableName)
            Next
        End Sub
    End Class
End Namespace

サンプル出力:

Description = MediaCatalogDB OLE DB Provider, Name = MediaCatalogDB OLE DB Provider, ParseName = {09E767A6-4481-4791-86A5-A739E5290E4C}

ProviderSubType =None, ProviderType = OleDb

SupportsNullColumns = True, UseFullTableName = True

Description = Microsoft OLE DB Provider for SQL Server, Name = SQLOLEDB, ParseName = {0C7FF16C-38E3-11d0-97AB-00C04FC2AD98}

ProviderSubType =SqlServer, ProviderType = OleDb

SupportsNullColumns = True, UseFullTableName = True

関連項目

参照

DBProviderInfo クラス

Microsoft.SqlServer.Dts.Runtime 名前空間