Class MariaDBConnectionDataProvider
- Namespace
- combit.Reporting.DataProviders
- Assembly
- combit.ListLabel31.CrossPlatform.MySqlConnectionDataProvider.dll
Provides a data provider implementation for MariaDB databases.
[Serializable]
public class MariaDBConnectionDataProvider : MySqlConnectionDataProvider, IDataProvider, ICanHandleUsedIdentifiers, IDisposable, ISupportsLogger, ISerializable
- Inheritance
-
MariaDBConnectionDataProvider
- Implements
- Inherited Members
Examples
The following example demonstrates how to use the MariaDBConnectionDataProvider to export a report to PDF:
// Create an instance of the MariaDBConnectionDataProvider using a connection string.
MariaDBConnectionDataProvider provider = new MariaDBConnectionDataProvider("Server=localhost;Database=mydb;User=myuser;Password=mypassword;");
// Create a ListLabel reporting engine instance and assign the provider as the data source.
using ListLabel listLabel = new ListLabel();
listLabel.DataSource = provider;
// Configure export settings to generate a PDF.
ExportConfiguration exportConfiguration = new ExportConfiguration(LlExportTarget.Pdf, exportFilePath, projectFilePath);
exportConfiguration.ShowResult = true;
// Export the report to PDF.
listLabel.Export(exportConfiguration);
Remarks
The MariaDBConnectionDataProvider class inherits from MySqlConnectionDataProvider and reuses its functionality for establishing connections and retrieving schema information. It is intended for use with MariaDB databases and leverages the MySQL Connector/NET under the hood. MariaDB is a community-developed, commercially supported fork of MySQL that maintains protocol compatibility, allowing the use of MySQL drivers. All features supported by MySqlConnectionDataProvider are available, including tables, views, advanced filtering, and schema-aware query construction.
Constructors
MariaDBConnectionDataProvider()
Initializes a new instance of the MariaDBConnectionDataProvider class.
protected MariaDBConnectionDataProvider()
MariaDBConnectionDataProvider(IDbConnection)
Initializes a new instance of the MariaDBConnectionDataProvider class using the specified database connection.
public MariaDBConnectionDataProvider(IDbConnection connection)
Parameters
connectionIDbConnectionAn IDbConnection representing the MariaDB connection.
MariaDBConnectionDataProvider(SerializationInfo, StreamingContext)
Initializes a new instance of the MariaDBConnectionDataProvider class from serialized data.
protected MariaDBConnectionDataProvider(SerializationInfo info, StreamingContext context)
Parameters
infoSerializationInfoThe SerializationInfo containing the serialized object data.
contextStreamingContextThe StreamingContext that contains contextual information about the source or destination.
MariaDBConnectionDataProvider(string)
Initializes a new instance of the MariaDBConnectionDataProvider class using the specified connection string.
public MariaDBConnectionDataProvider(string connectionString)
Parameters
connectionStringstringThe connection string for connecting to the MariaDB database.