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.1.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