DbConnectionDataProvider(DataSchemaProvider, DataProvider, IDisposable[]) Constructor
In This Article
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 |
---|---|---|
data |
Data |
A |
data |
Data |
A |
disposable |
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