Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

DbConnectionDataProvider(DataSchemaProvider, DataProvider, IDisposable[]) Constructor

Initializes a new instance of the DbConnectionDataProvider class with the specified settings.

Namespace: DevExpress.XtraReports.Data

Assembly: DevExpress.XtraReports.v24.2.dll

NuGet Package: DevExpress.Reporting.Core

#Declaration

public DbConnectionDataProvider(
    DataSchemaProvider dataSchemaProvider,
    DataProvider dataProvider,
    IDisposable[] disposableObjectCollection
)

#Parameters

Name Type Description
dataSchemaProvider DataSchemaProvider

A DataSchemaProvider object.

dataProvider DataProvider

A DataProvider object.

disposableObjectCollection IDisposable[]

An array of objects that implement the IDisposable interface.

#Example

The following code illustrates the process of registering a database on the server.

 IDisposable[] disposableObjectCollection = null;
    string connectionString = "Data Source=.;Initial Catalog=AdventureWorks;Integrated Security=True";
    IDataStore dataStore = XpoDefault.GetConnectionProvider(connectionString, 
        AutoCreateOption.None, out disposableObjectCollection);
    IDataStoreSchemaExplorer schemaExplorer = (IDataStoreSchemaExplorer)dataStore;
    DbConnectionDataProvider dbConnectionDataProvider =  new DbConnectionDataProvider(
        new DataSchemaProvider(schemaExplorer),
        new DataProvider(schemaExplorer, dataStore),
        disposableObjectCollection);
See Also