Partager via


DataSourceAttribute Constructor (String, String, String, DataBindingAccessMethod, DataBindingSelectColumns, array<String )

Initializes an instance of the DataSourceAttribute class using an array of table names, the defined access method, name of the data source, name of the provider, connection string, and the column filters.

Namespace:  Microsoft.VisualStudio.TestTools.WebTesting
Assembly:  Microsoft.VisualStudio.QualityTools.WebTestFramework (in Microsoft.VisualStudio.QualityTools.WebTestFramework.dll)

Syntax

'Declaration
Public Sub New ( _
    dataSourceName As String, _
    providerName As String, _
    connectionString As String, _
    accessMethod As DataBindingAccessMethod, _
    selectColumns As DataBindingSelectColumns, _
    ParamArray tableNames As String() _
)
public DataSourceAttribute(
    string dataSourceName,
    string providerName,
    string connectionString,
    DataBindingAccessMethod accessMethod,
    DataBindingSelectColumns selectColumns,
    params string[] tableNames
)
public:
DataSourceAttribute(
    String^ dataSourceName, 
    String^ providerName, 
    String^ connectionString, 
    DataBindingAccessMethod accessMethod, 
    DataBindingSelectColumns selectColumns, 
    ... array<String^>^ tableNames
)
new : 
        dataSourceName:string * 
        providerName:string * 
        connectionString:string * 
        accessMethod:DataBindingAccessMethod * 
        selectColumns:DataBindingSelectColumns * 
        tableNames:string[] -> DataSourceAttribute
public function DataSourceAttribute(
    dataSourceName : String, 
    providerName : String, 
    connectionString : String, 
    accessMethod : DataBindingAccessMethod, 
    selectColumns : DataBindingSelectColumns, 
    ... tableNames : String[]
)

Parameters

  • dataSourceName
    Type: String

    The name of the data source.

  • providerName
    Type: String

    The name of the data source provider.

  • connectionString
    Type: String

    The connection string to access the data source.

  • tableNames
    Type: array<String[]

    The table names within the data source that contain information to be accessed.

.NET Framework Security

See Also

Reference

DataSourceAttribute Class

DataSourceAttribute Overload

Microsoft.VisualStudio.TestTools.WebTesting Namespace

DataBindingAccessMethod

DataBindingSelectColumns