DTSProviderType 枚举
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
描述存储的服务提供者类型。
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 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
注解
该枚举被类在属性中ProviderType用DBProviderInfo来表示该类包含哪种类型的提供者。