Integrating SQLite Databases with Telerik Web Report Designer
Environment
Version | Product | Author |
---|---|---|
Telerik Web Report Designer | Desislava Yordanova |
Description
When attempting to use the Web Report Designer with an SQLite database in a Blazor or ASP.NET Core project, the SQLite option is available in the SqlDataSource dropdown list of providers. However, attempting to connect to a local SQLite database file results in an error.
This KB article also answers the following questions:
- How to connect the Telerik Web Report Designer to an SQLite database?
- What steps are needed to resolve the
System.Data.SQLite.SQLiteFactory
error in Telerik Reporting? - How to set up SQLite as a data source in the Telerik Web Report Designer?
Error Message
Cannot load type for DbProviderTypeName 'System.Data.SQLite.SQLiteFactory'.
Solution
To successfully integrate an SQLite database with the Telerik Web Report Designer in a Blazor or ASP.NET Core project, follow these steps:
-
Ensure the System.Data.SQLite NuGet package is installed in your project. This package is necessary for the Telerik Reporting to interface with SQLite databases.
-
Place your SQLite database file (e.g.,
northwind.db
) in the main folder of your project. This location makes it easier to reference the database in your connection strings.You may use any other SQLite database file with a proper connection string configured in the next step.
-
Use a sample connection string formatted as follows to test the data connection:
Data Source=northwind.db;Version=3;FailIfMissing=True;
This connection string assumes the database file is named
northwind.db
and is located in the root directory of your project.
Following these steps should allow the Web Report Designer to successfully connect to and use the SQLite database without encountering the System.Data.SQLite.SQLiteFactory
error.
Notes
- It's important to verify the version compatibility of the System.Data.SQLite package with your project's .NET version.
- Ensure the SQLite database file is accessible to the project, considering any necessary permissions or path adjustments.