sql data providers moved into one section in the docs (#1504)

* add articles for mysql, npgsql and odp.net providers

* add articles for mysql, npgsql and odp.net providers

* add microsoft sqlclient and sqlite articles to using data providers section

* small corrections and references in other articles

* Update using-microsoft-data-sqlclient-data-proivder.md

* Update using-mysql-data-provider.md

* Update using-npgsql-data-provider.md

* Update using-odp-net-data-provider.md

* Update using-sqlite-data-provider.md

* Update configuring-postgres-with-npgsql.md

* Update using-microsoft-data-sqlclient-data-proivder.md

* Update using-mysql-data-provider.md

---------

Co-authored-by: Todor Arabadzhiev <todor.arabadzhiev@progress.com>
This commit is contained in:
Dimitar Nikolov 2024-10-15 14:50:52 +03:00 коммит произвёл GitHub
Родитель e622196f0c
Коммит e5a943f457
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
13 изменённых файлов: 484 добавлений и 19 удалений

Просмотреть файл

@ -327,6 +327,9 @@ navigation:
designing-reports/connecting-to-data/data-source-components/sqldatasource-component:
position: 10
title: "SqlDataSource Component"
designing-reports/connecting-to-data/data-source-components/sqldatasource-component/using-data-providers:
position: 10
title: "Using Data Providers"
designing-reports/connecting-to-data/data-source-components/csvdatasource-component:
position: 11
title: "CsvDataSource Component"

Просмотреть файл

@ -0,0 +1,104 @@
---
title: Using the Microsoft SQL Client Data Provider
page_title: Integrating the Microsoft SQL Client Data Provider
description: "Learn more about how the Microsoft SQL Client data provider can be used by the SqlDataSource component to connect to MS SQL databases in Telerik Reporting."
slug: telerikreporting/designing-reports/connecting-to-data/data-source-components/sqldatasource-component/using-data-providers/using-microsfost-data-sqlclient-data-provider
tags: Microsoft.Data.SqlClient,data,provider
published: True
position: 4
---
# Overview
The [Microsoft.Data.SqlClient](https://learn.microsoft.com/en-us/sql/connect/ado-net/introduction-microsoft-data-sqlclient-namespace?view=sql-server-ver16) namespace is essentially a new version of the [System.Data.SqlClient](https://learn.microsoft.com/en-us/dotnet/api/system.data.sqlclient?view=net-8.0) namespace and can thus be used for connecting to Microsoft SQL Databases.
## Setting up the Microsoft.Data.SqlClient Data Provider in the .NET Standalone Report Designer
1. Create a new [.NET 8 Console Application](https://learn.microsoft.com/en-us/dotnet/csharp/tutorials/console-teleprompter) project.
1. Install the [Microsoft.Data.SqlClient](https://www.nuget.org/packages/Microsoft.Data.SqlClient/) NuGet package to it and `build` the project.
1. Navigate to the `bin/Debug/net8.0` subdirectory of the project, and copy all assemblies there except for the assembly with the name of the project.
1. Paste the assemblies in the .NET Standalone Report Designer installation directory e.g. `C:\Program Files (x86)\Progress\Telerik Reporting {{site.suiteversion}}\Report Designer\.NET`.
1. The `bin/Debug/net8.0` folder of the console application should contain an additional folder named `runtimes` with several subfolders such as `win`, `unix`, `win-x64`, etc. Copy the DLLs from the folders that correspond to your Operating System and CPU architecture.
1. Paste the additional runtime assemblies in the .NET Standalone Report Designer installation directory e.g. `C:\Program Files (x86)\Progress\Telerik Reporting {{site.suiteversion}}\Report Designer\.NET`.
1. Restart the designer if you have previously opened it.
1. Add a new SQL DataSource and you should see that the `Microsoft.Data.SqlClient` Data Provider is in the dropdown.
## Setting up the Microsoft.Data.SqlClient Data Provider in .NET Applications
### .NET Application with the Web Report Designer
1. Install the [Microsoft.Data.SqlClient](https://www.nuget.org/packages/Microsoft.Data.SqlClient/) NuGet package to it and `build` the project.
1. Register the [SqlClientFactory.Instance](https://learn.microsoft.com/en-us/dotnet/api/microsoft.data.sqlclient.sqlclientfactory.instance) in the `Telerik.Reporting.Processing.Data.DbProviderFactories` using the `RegisterFactory` method within the `static` constructor of the controller that inherits from [ReportDesignerControllerBase](/api/telerik.webreportdesigner.services.controllers.reportdesignercontrollerbase). For example:
````CSharp
[Route("api/reportdesigner")]
public class ReportDesignerController : ReportDesignerControllerBase
{
static ReportDesignerController()
{
Telerik.Reporting.Processing.Data.DbProviderFactories.RegisterFactory("Microsoft.Data.SqlClient", Microsoft.Data.SqlClient.SqlClientFactory.Instance);
}
public ReportDesignerController(IReportDesignerServiceConfiguration reportDesignerServiceConfiguration, IReportServiceConfiguration reportServiceConfiguration)
: base(reportDesignerServiceConfiguration, reportServiceConfiguration)
{
}
}
````
1. If the [SqlDataSource component]({%slug telerikreporting/designing-reports/connecting-to-data/data-source-components/sqldatasource-component/overview%}) uses a `shared` connection where it is retrieved from the configuration file of the project(e.g. `appsettings.json`), the provider name must be specified in the connection. For example:
````JSON
{
"ConnectionStrings":{
"mssql":{
"connectionString":"Server=myServerAddress;Database=myDataBase;User Id=myUsername;Password=myPassword;",
"providerName":"Microsoft.Data.SqlClient"
}
}
}
````
### .NET Application with Web Report Viewer
1. Install the [Microsoft.Data.SqlClient](https://www.nuget.org/packages/Microsoft.Data.SqlClient/) NuGet package to it and `build` the project.
1. Register the [SqlClientFactory.Instance](https://learn.microsoft.com/en-us/dotnet/api/microsoft.data.sqlclient.sqlclientfactory.instance) in the `Telerik.Reporting.Processing.Data.DbProviderFactories` using the `RegisterFactory` method within the `static` constructor of the controller that inherits from [ReportsControllerBase](/api/telerik.reporting.services.webapi.reportscontrollerbase). For example:
````CSharp
[Route("api/reports")]
public class ReportsController : ReportsControllerBase
{
static ReportsController()
{
Telerik.Reporting.Processing.Data.DbProviderFactories.RegisterFactory("Microsoft.Data.SqlClient", Microsoft.Data.SqlClient.SqlClientFactory.Instance);
}
public ReportsController(IReportServiceConfiguration reportServiceConfiguration)
: base(reportServiceConfiguration)
{
}
}
````
1. If the [SqlDataSource component]({%slug telerikreporting/designing-reports/connecting-to-data/data-source-components/sqldatasource-component/overview%}) uses a `shared` connection where it is retrieved from the configuration file of the project(e.g. `appsettings.json`), the provider name must be specified in the connection. For example:
````JSON
{
"ConnectionStrings":{
"mssql":{
"connectionString":"Server=myServerAddress;Database=myDataBase;User Id=myUsername;Password=myPassword;",
"providerName":"Microsoft.Data.SqlClient"
}
}
}
````
## See Also
* [How to Use Microsoft.Data.SqlClient Data Provider in Web Report Designer]({%slug connecting-to-microsoft-data-sqlclient-in-web-report-designer%})
* [Adding External Data Provider to .NET Standalone Designer]({%slug adding-external-data-provider-to-dotnet-standalone-designer%})
* [How to register a DbProviderFactory in a .NET Core project]({%slug how-to-register-db-provider-factory-in-net-core-project%})
* [Microsoft SqlClient Data Provider for SQL Server connection strings](https://www.connectionstrings.com/microsoft-data-sqlclient/)

Просмотреть файл

@ -0,0 +1,79 @@
---
title: Using the MySQL Data Provider
page_title: Integrating the MySQL Data Provider
description: "Learn more about how the MySQL data provider can be used by the SqlDataSource component to connect to MySQL databases in Telerik Reporting."
slug: telerikreporting/designing-reports/connecting-to-data/data-source-components/sqldatasource-component/using-data-providers/using-mysql-data-provider
tags: MySQL,data,provider
published: True
position: 2
---
# Overview
The `MySQL Connector/NET` is a fully managed ADO.NET data provider written in pure C# which can be used to connect to [MySQL](https://www.mysql.com/), [MariaDB](https://mariadb.org/), etc. databases.
## Setting up the MySQL Connector/NET Data Provider in the .NET Standalone Report Designer
1. Create a new [.NET 8 Console Application](https://learn.microsoft.com/en-us/dotnet/csharp/tutorials/console-teleprompter) project.
1. Install the [MySql.Data](https://www.nuget.org/packages/MySql.Data) NuGet package to it and `build` the project.
1. Navigate to the `bin/Debug/net8.0` subdirectory of the project, and copy all assemblies there except for the assembly with the name of the project.
1. Paste the assemblies in the .NET Standalone Report Designer installation directory e.g. `C:\Program Files (x86)\Progress\Telerik Reporting {{site.suiteversion}}\Report Designer\.NET`.
1. Start the .NET Standalone Report Designer from the same directory and add a new [SqlDataSource component]({%slug telerikreporting/designing-reports/connecting-to-data/data-source-components/sqldatasource-component/overview%}) which should trigger the [SqlDataSource Wizard]({%slug telerikreporting/designing-reports/report-designer-tools/desktop-designers/tools/data-source-wizards/sqldatasource-wizard/overview%}). The `MySQL` data provider should now be listed among the rest of the data providers when building a new connection.
## Setting up the MySQL Connector/NET Data Provider in the .NET Framework Standalone Report Designer
### Using MSI Installer
MySQL provides an `x86 32-bit` MSI installer that will install the MySQL data provider and register it in the `machine.config` - [MySQL Community Downloads](https://dev.mysql.com/downloads/connector/net/).
### Using the Source Code
The [MySQL Community Downloads](https://dev.mysql.com/downloads/connector/net/) page also offers the option of downloading the source code.
1. Download the source code `.zip` - [MySQL Community Downloads](https://dev.mysql.com/downloads/connector/net/).
1. Extract it and navigate to the `v4.6.2` subdirectory.
1. Copy all of the content in the `v4.6.2` directory to the directory with the .NET Framework Standalone Report Designer - `C:\Program Files (x86)\Progress\Telerik Reporting {{site.suiteversion}}\Report Designer\`.
1. Open the `Telerik.ReportDesigner.exe.config` file in a text editor and add the following XML to register the MySQL data provider without installing
````XML
<system.data>
<DbProviderFactories>
<add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=9.0.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"/>
</DbProviderFactories>
</system.data>
````
> The example was made with version `9.0.0` of the MySQL data provider, correct the version number in the above snippet if a newer/older version was downloaded instead.
## Setting up the MySQL Connector/NET Data Provider in .NET Applications
The [MySQL Connector/NET](https://dev.mysql.com/doc/connector-net/en/) data provider is automatically registered in the `Telerik.Reporting.Processing.Data.DbProviderFactories`. To use this data provider, it should be enough to install the [MySql.Data](https://www.nuget.org/packages/MySql.Data) NuGet package to the project.
If the [SqlDataSource component]({%slug telerikreporting/designing-reports/connecting-to-data/data-source-components/sqldatasource-component/overview%}) uses a `shared` connection where it is retrieved from the configuration file of the project(e.g. `appsettings.json`), the provider name must be specified in the connection. For example:
````JSON
{
"ConnectionStrings":{
"mysql":{
"connectionString":"Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;",
"providerName":"MySql.Data.MySqlClient"
}
}
}
````
## Web Report Designer
In the [SqlDataSource Wizard]({%slug telerikreporting/designing-reports/report-designer-tools/web-report-designer/tools/sqldatasource-wizard%}) of the [Web Report Designer]({%slug telerikreporting/designing-reports/report-designer-tools/web-report-designer/overview%}), on the first page, the `Data Provider` must be `MySql.Data.MySqlClient`, but the option is limited only to MySql.Data.
Since the engine cannot determine the type of the data provider by that name, it falls back to `System.Data.SqlClient` and claims that `"Port" is not a supported keyword`.
The workaround is to avoid using the SQL DataSource wizard and edit the data source properties directly in the `Properties` grid.
## See Also
* [Connection unsuccessful when Trying to Connect to MySQL Database in the Web Report Desginer]({%slug how-to-connect-to-mysql-database-through-the-sql-datasource-wizard-in-the-web-reportdesginer%})
* [MySQL connection strings](https://www.connectionstrings.com/mysql/)
* [Installing Connector/NET on Windows](https://dev.mysql.com/doc/connector-net/en/connector-net-installation-windows.html)
* [Installing Connector/NET Using the Standalone Installer](https://dev.mysql.com/doc/connector-net/en/connector-net-installation-binary-windows-installer.html)
* [Installing Connector/NET from Source](https://dev.mysql.com/doc/connector-net/en/connector-net-installation-source.html)

Просмотреть файл

@ -0,0 +1,119 @@
---
title: Using the Npgsql Data Provider
page_title: Integrating the Npgsql Data Provider
description: "Learn more about how the Npgsql data provider can be used by the SqlDataSource component in Telerik Reporting."
slug: telerikreporting/designing-reports/connecting-to-data/data-source-components/sqldatasource-component/using-data-providers/using-npgsql-data-provider
tags: Npgsql,data,provider,PostgreSQL
published: True
position: 0
---
# Overview
[Npgsql](https://www.npgsql.org/) is an open-source ADO.NET Data Provider for PostgreSQL, it allows programs written in C#, Visual Basic, and F# to access the PostgreSQL database server and execute queries to it.
## Setting up the Npgsql Data Provider in the .NET Standalone Report Designer
1. Create a new [.NET 8 Console Application](https://learn.microsoft.com/en-us/dotnet/csharp/tutorials/console-teleprompter) project.
1. Install the [Npgsql](https://www.nuget.org/packages/Npgsql/) NuGet package to it and `build` the project.
1. Navigate to the `bin/Debug/net8.0` subdirectory of the project, and copy all assemblies there except for the assembly with the name of the project.
1. Paste the assemblies in the .NET Standalone Report Designer installation directory e.g. `C:\Program Files (x86)\Progress\Telerik Reporting {{site.suiteversion}}\Report Designer\.NET`.
1. Start the .NET Standalone Report Designer from the same directory and add a new [SqlDataSource component]({%slug telerikreporting/designing-reports/connecting-to-data/data-source-components/sqldatasource-component/overview%}) which should trigger the [SqlDataSource Wizard]({%slug telerikreporting/designing-reports/report-designer-tools/desktop-designers/tools/data-source-wizards/sqldatasource-wizard/overview%}). The `Npgsql` data provider should now be listed among the rest of the data providers when building a new connection.
## Setting up the Npgsql Data Provider in the .NET Framework Standalone Report Designer
### MSI Installation - Npgsql 3.2.7
1. Install [Npgsql version 3.2.7](https://github.com/npgsql/npgsql/releases/tag/v3.2.7) by using the `.MSI` file. Note that the [SqlDataSource]({%slug telerikreporting/designing-reports/connecting-to-data/data-source-components/sqldatasource-component/overview%}) component will list and work with any `ADO.NET` provider that is correctly registered on the device;
1. Add **SQL Data Source** -> **Build new data connection** -> select **Npgsql Data Provider**;
1. Add the **Connection string** in the field. For example:
`Server=127.0.0.1;Port=5432;Database=myDataBase;User Id=myUsername;Password=myPassword;`
1. Click **Next** -> fill in the **Select Statement** or use the **Query Builder** -> **Finish**.
### Manual Configuration
1. Create a new [.NET Framework 4.6.2 Comsole Application](https://learn.microsoft.com/en-us/dotnet/csharp/tutorials/console-teleprompter) project.
1. Install the [Npgsql 8.0.4](https://www.nuget.org/packages/Npgsql/8.0.4) NuGet package to it and `build` the project. package;
1. Navigate to the `bin/Debug` subdirectory of the project, and copy all assemblies there except for the assembly with the name of the project.
1. Paste the assemblies in the .NET Framework Standalone Report Designer installation directory e.g. `C:\Program Files (x86)\Progress\Telerik Reporting {{site.suiteversion}}\Report Designer`.
1. Open the `App.config` file of the application and copy the binding redirects;
1. Open the configuration file of the Standalone designer (`Telerik.ReportDesigner.exe.config`) and add the binding redirects:
````XML
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section
name="Telerik.Reporting"
type="Telerik.Reporting.Configuration.ReportingConfigurationSection, Telerik.Reporting"
allowLocation="true"
allowDefinition="Everywhere"/>
</configSections>
<runtime>
<dependentAssembly>
<assemblyIdentity name="Npgsql" culture="neutral" publicKeyToken="5d8b90d52f46fda7"/>
<bindingRedirect oldVersion="0.0.0.0-8.0.4.0" newVersion="8.0.4.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Bcl.AsyncInterfaces" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.4.0" newVersion="4.1.4.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.2.0.1" newVersion="4.2.0.1" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<system.data>
<DbProviderFactories>
<add name="Npgsql Data Provider"
invariant="Npgsql"
description=".NET Framework Data Provider for Postgresql Server"
type="Npgsql.NpgsqlFactory, Npgsql, Version=8.0.4.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7" />
</DbProviderFactories>
</system.data>
<configuration>
````
## Setting up the Npgsql Data Provider in .NET Applications
The [Npgsql](https://www.npgsql.org/) data provider is automatically registered in the `Telerik.Reporting.Processing.Data.DbProviderFactories`. To use this data provider, it should be enough to install the [Npgsql](https://www.nuget.org/packages/Npgsql/) NuGet package to the project.
If the [SqlDataSource component]({%slug telerikreporting/designing-reports/connecting-to-data/data-source-components/sqldatasource-component/overview%}) uses a `shared` connection where it is retrieved from the configuration file of the project(e.g. `appsettings.json`), the provider name must be specified in the connection. For example:
````JSON
{
"ConnectionStrings":{
"postgres":{
"connectionString":"Server=127.0.0.1;Port=5432;Database=myDataBase;User Id=myUsername;Password=myPassword;",
"providerName":"Npgsql"
}
}
}
````
## See Also
* [PostgreSQL connection strings](https://www.connectionstrings.com/postgresql/)
* [Connecting to PostgreSQL DB]({%slug configuring-postgres-with-npgsql%})

Просмотреть файл

@ -0,0 +1,51 @@
---
title: Using the ODP.NET Data Provider
page_title: Integrating the ODP.NET Data Provider
description: "Learn more about how the ODP.NET data provider can be used by the SqlDataSource component to connect to Oracle databases in Telerik Reporting."
slug: telerikreporting/designing-reports/connecting-to-data/data-source-components/sqldatasource-component/using-data-providers/using-odpnet-data-provider
tags: ODP.NET,data,provider,Oracle
published: True
position: 1
---
# Overview
The [Oracle Data Provider for .NET (ODP.NET)](https://www.oracle.com/database/technologies/appdev/dotnet/odp.html) features optimized ADO.NET data access to Oracle databases.
There are three driver types: ODP.NET Core; ODP.NET, Managed Driver; and ODP.NET, Unmanaged Driver. ODP.NET Core is designed for multi-platform .NET (Core) applications. ODP.NET, Managed Driver is a 100% managed code .NET Framework provider.
## Setting up the ODP.NET Data Provider in the .NET Standalone Report Designer
1. Create a new [.NET 8 Console Application](https://learn.microsoft.com/en-us/dotnet/csharp/tutorials/console-teleprompter) project.
1. Install the [Oracle.ManagedDataAccess.Core](https://www.nuget.org/packages/Oracle.ManagedDataAccess.Core) NuGet package to it and `build` the project.
1. Navigate to the `bin/Debug/net8.0` subdirectory of the project, and copy all assemblies there except for the assembly with the name of the project.
1. Paste the assemblies in the .NET Standalone Report Designer installation directory e.g. `C:\Program Files (x86)\Progress\Telerik Reporting {{site.suiteversion}}\Report Designer\.NET`.
1. Start the .NET Standalone Report Designer from the same directory and add a new [SqlDataSource component]({%slug telerikreporting/designing-reports/connecting-to-data/data-source-components/sqldatasource-component/overview%}) which should trigger the [SqlDataSource Wizard]({%slug telerikreporting/designing-reports/report-designer-tools/desktop-designers/tools/data-source-wizards/sqldatasource-wizard/overview%}). The `ODP.NET Managaed` data provider should now be listed among the rest of the data providers when building a new connection.
## Setting up the ODP.NET Data Provider in the .NET Framework Standalone Report Designer
Visit the official [Download ODP.NET, Oracle Developer Tools for Visual Studio (Code), and ODAC](https://www.oracle.com/database/technologies/net-downloads.html) page and download the MSI installer for the `Oracle Client for Microsoft Tools`.
Choose between the 32-bit and 64-bit Oracle Client for Microsoft Tools installers depending on which .NET Framework Standalone Report Designer will be used. The default one is the 64-bit variant.
## Setting up the ODP.NET Data Provider in .NET Applications
The [Oracle Data Provider for .NET (ODP.NET)](https://www.oracle.com/database/technologies/appdev/dotnet/odp.html) data provider is automatically registered in the `Telerik.Reporting.Processing.Data.DbProviderFactories`. To use this data provider, it should be enough to install the [Oracle.ManagedDataAccess.Core](https://www.nuget.org/packages/Oracle.ManagedDataAccess.Core) NuGet package to the project.
If the [SqlDataSource component]({%slug telerikreporting/designing-reports/connecting-to-data/data-source-components/sqldatasource-component/overview%}) uses a `shared` connection where it is retrieved from the configuration file of the project(e.g. `appsettings.json`), the provider name must be specified in the connection. For example:
````JSON
{
"ConnectionStrings":{
"oracle":{
"connectionString":"Data Source=TORCL;User Id=myUsername;Password=myPassword;",
"providerName":"Oracle.ManagedDataAccess.Client"
}
}
}
````
## See Also
* [Oracle Data Provider for .NET / ODP.NET connection strings](https://www.connectionstrings.com/oracle-data-provider-for-net-odp-net/)
* [Download ODP.NET, Oracle Developer Tools for Visual Studio (Code), and ODAC](https://www.oracle.com/database/technologies/net-downloads.html)

Просмотреть файл

@ -0,0 +1,68 @@
---
title: Using the SQLite Data Provider
page_title: Integrating the SQLite Data Provider
description: "Learn more about how the SQLite data provider can be used by the SqlDataSource component to connect to local data storages in Telerik Reporting."
slug: telerikreporting/designing-reports/connecting-to-data/data-source-components/sqldatasource-component/using-data-providers/using-sqlite-data-provider
tags: System.Data.Sqlite,sqlite,data,provider
published: True
position: 5
---
# Overview
The [System.Data.SQLite](https://system.data.sqlite.org/) is an ADO.NET provider for [SQLite](https://www.sqlite.org/). SQLite is not directly comparable to client/server SQL database engines such as MySQL, Oracle, PostgreSQL, or SQL Server and instead focuses on providing local data storage for individual applications and devices.
## Setting up the System.Data.Sqlite Data Provider in the .NET Standalone Report Designer
1. Download the **SQLite Binaries** built for `.NET Standard 2.0` or `.NET Standard 2.1` from the [System.Data.Sqlite](http://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki) Downloads page.
1. Unpackage the zip with the binaries and copy the `System.Data.Sqlite.dll` file to the .NET Standalone Report Designer installation directory e.g. `C:\Program Files (x86)\Progress\Telerik Reporting {{site.suiteversion}}\Report Designer\.NET`.
1. Download SQLite binaries built for `.NET Framework.4.X` from the [System.Data.Sqlite](http://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki) page, for example [sqlite-netFx40-binary-x64-2010-1.0.117.0.zip](https://system.data.sqlite.org/downloads/1.0.117.0/sqlite-netFx40-binary-x64-2010-1.0.117.0.zip).
1. Unpackage the archive and copy the `SQLite.Interop.dll` assembly to the .NET Standalone Report Designer installation directory e.g. `C:\Program Files (x86)\Progress\Telerik Reporting {{site.suiteversion}}\Report Designer\.NET`.
1. Restart the designer if you have previously opened it.
1. Add a new SqlDataSource and you should see that the `Sqlite` Data Provider is in the dropdown.
## Setting up the System.Data.Sqlite Data Provider in the .NET Framework Standalone Report Designer
1. Download the SQLite installer for `.NET Framework 4.6` from the [System.Data.Sqlite](http://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki) Downloads page.
1. Copy the `System.Data.Sqlite.dll` and `SQLite.Interop.dll` assemblies from the System.Data.Sqlite installation directory to the directory with the .NET Framework Standalone Report Designer - `C:\Program Files (x86)\Progress\Telerik Reporting {{site.suiteversion}}\Report Designer\`.
SQLite Installation: `C:\Program Files\System.Data.SQLite\2015\bin`
Telerik Reporting Installation: `C:\Program Files (x86)\Progress\Telerik Reporting {{site.suiteversion}}\Report Designer`
1. Add the DbProvider Factory declaration to the appropriate Standalone Report Designer configuration file. `Telerik.ReportDesigner.exe.config` is for 64-bit (x64) and `Telerik.ReportDesigner.x86.exe.config` is for 32-bit (x86).
>note When updating the configuration file, use the version that matches the installed SQLite ADO.NET Provider, i.e., `64-bit (x64)` or `32-bit (x86)`.
````XML
<system.data>
<DbProviderFactories>
<remove invariant="System.Data.SQLite" />
<add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".NET Framework Data Provider for SQLite"
type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite, Version=1.0.117.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139" />
</DbProviderFactories>
</system.data>
````
## Setting up the System.Data.Sqlite Data Provider in .NET Applications
The [System.Data.Sqlite](https://system.data.sqlite.org/) data provider is automatically registered in the `Telerik.Reporting.Processing.Data.DbProviderFactories`. To use this data provider, it should be enough to install the [System.Data.SQLite](https://www.nuget.org/packages/System.Data.SQLite/) NuGet package to the project.
If the [SqlDataSource component]({%slug telerikreporting/designing-reports/connecting-to-data/data-source-components/sqldatasource-component/overview%}) uses a `shared` connection where it is retrieved from the configuration file of the project(e.g. `appsettings.json`), the provider name must be specified in the connection. For example:
````JSON
{
"ConnectionStrings":{
"sqlite":{
"connectionString":"Data Source=c:\mydb.db;Version=3;",
"providerName":"System.Data.Sqlite"
}
}
}
````
## See Also
* [How to configure SQLite ADO.NET Provider for Standalone Report Designer]({%slug configure-the-stand-alone-report-designer-sqlite-data-provider%})
* [Integrating SQLite Databases with Telerik Web Report Designer]({%slug integrate-sqlite-databases-telerik-web-report-designer%})
* [SQLite connection strings](https://www.connectionstrings.com/sqlite/)

Просмотреть файл

@ -31,6 +31,8 @@ res_type: kb
## Description
> Visit the updated [Integrating the Microsoft SQL Client Data Provider]({%slug telerikreporting/designing-reports/connecting-to-data/data-source-components/sqldatasource-component/using-data-providers/using-microsfost-data-sqlclient-data-provider%}) article for a how-to on connecting to MS SQL Databases.
With [R3 2022](https://www.telerik.com/support/whats-new/reporting/release-history/progress-telerik-reporting-r3-2022-16-2-22-914), we started shipping a Stanadalone Report Designer compiled for .NET 6.0 runtime which allows resolving assemblies that target .NET Core/5/6. The designer now has the ability to automatically discover assemblies which means that there is no need to register them in the configuration file.
The designer can be found in the installation folder of Telerik Reporting -> `\Report Designer\.NET`.

Просмотреть файл

@ -26,6 +26,8 @@ res_type: kb
## Description
> Visit the updated [Integrating the SQLite Data Provider]({%slug telerikreporting/designing-reports/connecting-to-data/data-source-components/sqldatasource-component/using-data-providers/using-sqlite-data-provider%}) article for a how-to on connecting to SQLite Databases.
Configuring the SQLite ADO.NET Provider for the Stand-alone Report Designer requires a few steps. If one is missed, the DataSource provider will not work in the Report Designer. Follow the below steps to get this working.
## Solutions

Просмотреть файл

@ -20,27 +20,39 @@ res_type: kb
</tbody>
</table>
## Description
# Description
This KB article lists the required steps for configuring the [SqlDataSource]({%slug telerikreporting/designing-reports/connecting-to-data/data-source-components/sqldatasource-component/overview%}) component to connect to a [PostgreSQL](https://www.postgresql.org/) database with the `Npgsql` data provider.
## Solution for Npgsql version 3.2.7
# Solutions
## Setting up the Npgsql Data Provider in the .NET Standalone Report Designer
1. Create a new [.NET 8 Console Application](https://learn.microsoft.com/en-us/dotnet/csharp/tutorials/console-teleprompter) project.
1. Install the [Npgsql](https://www.nuget.org/packages/Npgsql/) NuGet package to it and `build` the project.
1. Navigate to the `bin/Debug/net8.0` subdirectory of the project, and copy all assemblies there except for the assembly with the name of the project.
1. Paste the assemblies in the .NET Standalone Report Designer installation directory e.g. `C:\Program Files (x86)\Progress\Telerik Reporting {{site.suiteversion}}\Report Designer\.NET`.
1. Start the .NET Standalone Report Designer from the same directory and add a new [SqlDataSource component]({%slug telerikreporting/designing-reports/connecting-to-data/data-source-components/sqldatasource-component/overview%}) which should trigger the [SqlDataSource Wizard]({%slug telerikreporting/designing-reports/report-designer-tools/desktop-designers/tools/data-source-wizards/sqldatasource-wizard/overview%}). The `Npgsql` data provider should now be listed among the rest of the data providers when building a new connection.
## Setting up the Npgsql Data Provider in the .NET Framework Standalone Report Designer
### MSI Installation - Npgsql 3.2.7
1. Install [Npgsql version 3.2.7](https://github.com/npgsql/npgsql/releases/tag/v3.2.7) by using the `.MSI` file. Note that the [SqlDataSource]({%slug telerikreporting/designing-reports/connecting-to-data/data-source-components/sqldatasource-component/overview%}) component will list and work with any `ADO.NET` provider that is correctly registered on the device;
1. Add **SQL Data Source** -> **Build new data connection** -> select **Npgsql Data Provider**;
1. Add the **Connection string** in the field. For example:
`Host=reporting7x64.telerik.com;Username=postgres;Password=password;Database=postgres`
`Server=127.0.0.1;Port=5432;Database=myDataBase;User Id=myUsername;Password=myPassword;`
1. Click **Next** -> fill in the **Select Statement** or use the **Query Builder** -> **Finish**.
## Solution for Npgsql version >= 4.1.11
### Manual Configuration
1. Create a sample Console application and add the `Npgsql 4.1.11.0` NuGet package;
1. Build the project, then copy the assemblies which are related to the data provider from the `bin` folder of the application;
1. Paste them to the folder of the Standalone designer executable file;
1. Go to the `App.config` file of the application and copy the binding redirects;
1. Create a new [.NET Framework 4.6.2 Console Application](https://learn.microsoft.com/en-us/dotnet/csharp/tutorials/console-teleprompter) project.
1. Install the [Npgsql 8.0.4](https://www.nuget.org/packages/Npgsql/8.0.4) NuGet package to it and `build` the project. package;
1. Navigate to the `bin/Debug` subdirectory of the project, and copy all assemblies there except for the assembly with the name of the project.
1. Paste the assemblies in the .NET Framework Standalone Report Designer installation directory e.g. `C:\Program Files (x86)\Progress\Telerik Reporting {{site.suiteversion}}\Report Designer`.
1. Open the `App.config` file of the application and copy the binding redirects;
1. Open the configuration file of the Standalone designer (`Telerik.ReportDesigner.exe.config`) and add the binding redirects:
````XML
@ -55,18 +67,13 @@ This KB article lists the required steps for configuring the [SqlDataSource]({%s
</configSections>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<!--
<probing privatePath="path-to-the-assemblies"/>
-->
. . .
<dependentAssembly>
<assemblyIdentity name="Npgsql" culture="neutral" publicKeyToken="5d8b90d52f46fda7"/>
<bindingRedirect oldVersion="0.0.0.0-4.1.11.0" newVersion="4.1.11.0" />
<bindingRedirect oldVersion="0.0.0.0-8.0.4.0" newVersion="8.0.4.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Bcl.AsyncInterfaces" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.0.0.0" newVersion="1.0.0.0" />
<bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
@ -74,7 +81,7 @@ This KB article lists the required steps for configuring the [SqlDataSource]({%s
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.5.0" newVersion="4.0.5.0" />
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
@ -96,11 +103,31 @@ This KB article lists the required steps for configuring the [SqlDataSource]({%s
<add name="Npgsql Data Provider"
invariant="Npgsql"
description=".NET Framework Data Provider for Postgresql Server"
type="Npgsql.NpgsqlFactory, Npgsql, Version=4.1.11.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7" />
type="Npgsql.NpgsqlFactory, Npgsql, Version=8.0.4.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7" />
</DbProviderFactories>
</system.data>
<configuration>
````
1. Repeat the steps 2-4 from the previous section.
## Setting up the Npgsql Data Provider in .NET Applications
The [Npgsql](https://www.npgsql.org/) data provider is automatically registered in the `Telerik.Reporting.Processing.Data.DbProviderFactories`. To use this data provider, it should be enough to install the [Npgsql](https://www.nuget.org/packages/Npgsql/) NuGet package to the project.
If the [SqlDataSource component]({%slug telerikreporting/designing-reports/connecting-to-data/data-source-components/sqldatasource-component/overview%}) uses a `shared` connection where it is retrieved from the configuration file of the project(e.g. `appsettings.json`), the provider name must be specified in the connection. For example:
````JSON
{
"ConnectionStrings":{
"postgres":{
"connectionString":"Server=127.0.0.1;Port=5432;Database=myDataBase;User Id=myUsername;Password=myPassword;",
"providerName":"Npgsql"
}
}
}
````
## See Also
* [PostgreSQL connection strings](https://www.connectionstrings.com/postgresql/)
* [Connecting to PostgreSQL DB]({%slug telerikreporting/designing-reports/connecting-to-data/data-source-components/sqldatasource-component/using-data-providers/using-npgsql-data-provider%})

Просмотреть файл

@ -25,6 +25,9 @@ res_type: kb
</table>
## Description
> Visit the updated [Integrating the Microsoft SQL Client Data Provider]({%slug telerikreporting/designing-reports/connecting-to-data/data-source-components/sqldatasource-component/using-data-providers/using-microsfost-data-sqlclient-data-provider%}) article for a how-to on connecting to MS SQL Databases.
The Telerik Reporting engine is extensible and it provides options to register virtually any DbProvider to be used in your application.
For .NET Framework this is done in the application configuration file,
as explained in this article:

Просмотреть файл

@ -26,6 +26,9 @@ res_type: kb
## Description
> Visit the updated [Integrating the MySQL Data Provider]({%slug telerikreporting/designing-reports/connecting-to-data/data-source-components/sqldatasource-component/using-data-providers/using-mysql-data-provider%}) article for a how-to on connecting to MySQL Databases.
The error below is thrown when tring to connect to MySQL Database through the SQL DataSource Wizard in the Web Report Desginer.
## Error Message

Просмотреть файл

@ -17,6 +17,8 @@ ticketid: 1655822
## Description
> Visit the updated [Integrating the SQLite Data Provider]({%slug telerikreporting/designing-reports/connecting-to-data/data-source-components/sqldatasource-component/using-data-providers/using-sqlite-data-provider%}) article for a how-to on connecting to SQLite Databases.
When attempting to use the [Web Report Designer]({%slug telerikreporting/designing-reports/report-designer-tools/web-report-designer/overview%}) 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.
![SQLiteFactory Error](images/sqlite-web-report-designer-error.png)

Просмотреть файл

@ -22,6 +22,8 @@ res_type: kb
## Description
> Visit the updated [Integrating the ODP.NET Data Provider]({%slug telerikreporting/designing-reports/connecting-to-data/data-source-components/sqldatasource-component/using-data-providers/using-odpnet-data-provider%}) article for a how-to on connecting to Oracle Databases.
`System.Data.OracleClient` is a Microsoft .NET Framework data provider allowing you to connect to an Oracle database. The provider is deprecated and it should not be used - [Oracle and ADO.NET](https://learn.microsoft.com/en-us/dotnet/framework/data/adonet/oracle-and-adonet).
## Solution