Application.DBProviderInfos 属性

定义

返回包含应用程序中的 DBProviderInfos 对象的 DBProviderInfo 集合。 此属性为只读。

public:
 property Microsoft::SqlServer::Dts::Runtime::DBProviderInfos ^ DBProviderInfos { Microsoft::SqlServer::Dts::Runtime::DBProviderInfos ^ get(); };
public Microsoft.SqlServer.Dts.Runtime.DBProviderInfos DBProviderInfos { get; }
member this.DBProviderInfos : Microsoft.SqlServer.Dts.Runtime.DBProviderInfos
Public ReadOnly Property DBProviderInfos As DBProviderInfos

属性值

返回包含应用程序的所有 DBProviderInfos 对象的 DBProviderInfo 集合。

示例

下面的代码示例演示如何枚举可用的数据库提供程序。

class ApplicationTests
    {
        static void Main(string[] args)
        {
            Application app = new Application();
            DBProviderInfos dbis = app.DBProviderInfos;
            Console.WriteLine("Database Provider Info:");
            foreach (DBProviderInfo dbi in dbis)
                Console.WriteLine(dbi.Description);
        }
    }
class ApplicationTests
    Sub Main(ByVal args() As String)
        Dim app As Application =  New Application() 
        Dim dbis As DBProviderInfos =  app.DBProviderInfos 
        Console.WriteLine("Database Provider Info:")
        For Each dbi As DBProviderInfo In dbis
            Console.WriteLine(dbi.Description)
        Next
    End Sub
End Class

适用于