DataSourceAttribute.ProviderInvariantName Property

Gets a value representing the data provider of the data source.

Namespace:  Microsoft.VisualStudio.TestTools.UnitTesting
Assembly:  Microsoft.VisualStudio.QualityTools.UnitTestFramework (in Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll)

Syntax

'Declaration
Public ReadOnly Property ProviderInvariantName As String
public string ProviderInvariantName { get; }
public:
property String^ ProviderInvariantName {
    String^ get ();
}
member ProviderInvariantName : string with get
function get ProviderInvariantName () : String

Property Value

Type: String
The data provider name. If a data provider was not designated at object initialization, the default provider of System.Data.OleDb will be returned.

Remarks

Different providers use different connection strings.

A list of possible data providers are:

  • .NET Framework Data Provider for OLE DB (for Access and other Jet databases).

  • .NET Framework Data Provider for ODBC.

  • .NET Framework Data Provider for SQL Server (to connect to Microsoft SQL Server 7.0, 2000, 2005, and local Microsoft SQL Server instances including Microsoft SQL Express).

  • .NET Framework Data Provider to connect to SQL Server 2005 Mobile Edition.

  • .NET Framework Data Provider for Oracle (to connect to Oracle 7.3, 8i, or 9i).

To set this attribute property, see How to: Configure a Data-Driven Unit Test.

.NET Framework Security

See Also

Reference

DataSourceAttribute Class

Microsoft.VisualStudio.TestTools.UnitTesting Namespace

Other Resources

How to: Configure a Data-Driven Unit Test