Table of Contents

Class AccessDataProvider

Namespace
combit.Reporting.DataProviders
Assembly
combit.ListLabel31.CrossPlatform.OleDbConnectionDataProvider.dll

Provides a data provider implementation for Microsoft Access databases.

[Serializable]
public sealed class AccessDataProvider : OleDbConnectionDataProvider, IDataProvider, ICanHandleUsedIdentifiers, IDisposable, ISupportsLogger, ISerializable, IFileList
Inheritance
AccessDataProvider
Implements
Inherited Members

Examples

The following example demonstrates how to use the AccessDataProvider:

// Create an instance of the AccessDataProvider for an Access database file.
AccessDataProvider provider = new AccessDataProvider(@"C:\Data\MyDatabase.accdb", "mypassword");

// Assign the provider as the data source for the List & Label reporting engine.
using ListLabel listLabel = new ListLabel();
listLabel.DataSource = provider;
ExportConfiguration exportConfiguration = new ExportConfiguration(LlExportTarget.Pdf, exportFilePath, projectFilePath);
exportConfiguration.ShowResult = true;
listLabel.Export(exportConfiguration);

Remarks

The AccessDataProvider class extends OleDbConnectionDataProvider to provide connectivity to Microsoft Access databases (both .mdb and .accdb files). It supports advanced filtering and uses Microsoft Access SQL syntax for query generation. The provider automatically detects whether to use the Microsoft ACE OLEDB provider (preferred) or the Jet OLEDB provider (fallback) based on the system configuration and the installed drivers.

Constructors

AccessDataProvider(string)

Initializes a new instance of the AccessDataProvider class for the specified Access database file.

public AccessDataProvider(string fileName)

Parameters

fileName string

The path to the Access database file.

AccessDataProvider(string, string)

Initializes a new instance of the AccessDataProvider class for the specified Access database file using the provided password.

public AccessDataProvider(string fileName, string password)

Parameters

fileName string

The path to the Access database file.

password string

The password for the Access database.

Properties

FileName

Gets the file name of the Access database.

public string FileName { get; }

Property Value

string