combit List & Label 29 - .NET Help
combit.Reporting.DataProviders Namespace / SqlConnectionDataProvider Class / SqlConnectionDataProvider Constructor / SqlConnectionDataProvider Constructor(SqlConnection,String)
The connection to use.
The allowed table schema.
Example


In This Topic
    SqlConnectionDataProvider Constructor(SqlConnection,String)
    In This Topic
    Initializes the data provider to access all elements available from the connection that belong to the passed schema.
    Syntax
    'Declaration
     
    
    Public Function New( _
       ByVal connection As SqlConnection, _
       ByVal tableSchema As String _
    )
    public SqlConnectionDataProvider( 
       SqlConnection connection,
       string tableSchema
    )
    public:
    SqlConnectionDataProvider( 
       SqlConnection^ connection,
       String^ tableSchema
    )

    Parameters

    connection
    The connection to use.
    tableSchema
    The allowed table schema.
    Example
    SqlConnection conn = new SqlConnection(Properties.Settings.Default.ConnectionString);   
    SqlConnectionDataProvider provider = new SqlConnectionDataProvider(conn, "HumanResources");   
    LL.DataSource = provider;   
    LL.Design();
    Dim conn As New SqlConnection(Properties.Settings.[Default].ConnectionString)
    Dim provider As New SqlConnectionDataProvider(conn, "HumanResources")
    LL.DataSource = provider
    LL.Design()
    Requirements

    Platforms: Windows 10 (Version 21H2 - 23H2), Windows 11 (21H2 - 22H2), Windows Server 2016 - 2022
    .NET: .NET Framework 4.8, .NET 6, .NET 7, .NET 8

    See Also