DTSProviderType 枚举

定义

说明存储的访问接口类型。

public enum class DTSProviderType
public enum DTSProviderType
type DTSProviderType = 
Public Enum DTSProviderType
继承
DTSProviderType

字段

DtsDestination -4

访问接口是目标。

DtsSource -3

访问接口是数据的源。

Odbc -2

访问接口是 ODBC 访问接口。

OleDb -1

访问接口是 OLEDB 访问接口。

Unknown 0

访问接口是未知类型。

示例

下面的示例枚举计算机上可用的数据库提供程序的属性,包括 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 提供程序,名称 = MediaCatalogDB OLE DB 提供程序,ParseName = {09E767A6-4481-4791-86A5-A739E5290E4C}

ProviderSubType = None,ProviderType = OleDb

SupportsNullColumns = True,UseFullTableName = True

Description = 适用于 SQL Server 的 Microsoft OLE DB 提供程序,名称 = SQLOLEDB,ParseName = {0C7FF16C-38E3-11d0-97AB-00C04FC2AD98}

ProviderSubType = SqlServer,ProviderType = OleDb

SupportsNullColumns = True,UseFullTableName = True

注解

此枚举由 DBProviderInfo 类在属性中用 ProviderType 来指示类包含的提供程序类型。

适用于