How to use MySqlConnector instead of MySql.Data

Stimulsoft Reports.NET discussion
kvasserman
Posts: 2
Joined: Fri May 21, 2021 2:53 pm

How to use MySqlConnector instead of MySql.Data

Post by kvasserman »

Hello,

We are switching our application from Orcle's MySql.Data driver to MySqlConnector (https://mysqlconnector.net/). However, StiSqlDatabase fails with "MySql.Data" assembly cannot be found. Which is understandable, because we no longer build with it.

I'm having a hard time figuring out how to switch Stimulsoft.Reports.Net to use MySqlConnector driver instead. Do we need to create a custom StiDataAdapterService or custom StiDatabase class? Or both? I can't find any documentation or samples to do this. Can you point me into the right direction? What is the best way of making this work?

Thank you.
Lech Kulikowski
Posts: 6163
Joined: Tue Mar 20, 2018 5:34 am

Re: How to use MySqlConnector instead of MySql.Data

Post by Lech Kulikowski »

Hello,

You can create your own MySql data adapter based on that connector.
The sample of the custom adapter in the attachment.

Thank you.
Attachments
Stimulsoft.Report.PostgreSQL.zip
(8.44 KiB) Downloaded 210 times
kvasserman
Posts: 2
Joined: Fri May 21, 2021 2:53 pm

Re: How to use MySqlConnector instead of MySql.Data

Post by kvasserman »

Thank you, Lech.
Lech Kulikowski
Posts: 6163
Joined: Tue Mar 20, 2018 5:34 am

Re: How to use MySqlConnector instead of MySql.Data

Post by Lech Kulikowski »

Hello,

You are welcome.
Fcampero
Posts: 6
Joined: Tue Jun 08, 2021 1:51 pm

Re: How to use MySqlConnector instead of MySql.Data

Post by Fcampero »

Hi Lech, about this topic we have tried the approach you sent to create a new data adapter, and it worked for the reports. But when we try to execute a query using the designer to add a new datasource with that adapter it throws an ugly "Connection Error" message. Do you have any idea how to resolve it?
Lech Kulikowski
Posts: 6163
Joined: Tue Mar 20, 2018 5:34 am

Re: How to use MySqlConnector instead of MySql.Data

Post by Lech Kulikowski »

Hello,

Please clarify which product, version and designer are you use?

Thank you.
Fcampero
Posts: 6
Joined: Tue Jun 08, 2021 1:51 pm

Re: How to use MySqlConnector instead of MySql.Data

Post by Fcampero »

we are using this package

"Stimulsoft.Reports.Web.NetCore" Version="2020.4.2"
Lech Kulikowski
Posts: 6163
Joined: Tue Mar 20, 2018 5:34 am

Re: How to use MySqlConnector instead of MySql.Data

Post by Lech Kulikowski »

Hello,

The sample of the custom adapter for NET Core in the attachment.

Thank you.
Attachments
Stimulsoft.Report.PostgreSQL.NETCore.zip
(6.25 KiB) Downloaded 153 times
Naveen Aggarwal
Posts: 70
Joined: Wed Feb 24, 2010 11:08 am
Location: India

Re: How to use MySqlConnector instead of MySql.Data

Post by Naveen Aggarwal »

Lech Kulikowski wrote: Mon May 24, 2021 2:54 pm Hello,

You can create your own MySql data adapter based on that connector.
The sample of the custom adapter in the attachment.

Thank you.
Hello Sir,
I have created the data adapter based on MySqlConnector using the project shared in the post.
There are two problems:
Although I used MySqlConnector in place of npgsql and changed postgresql to mysql everywhere in the project, name of the assembly
created remains Stimulsoft.Report.PostgreSQL.
I am not able to register the custom adapter i.e. it is not visible when I create a new datasource.

Kindly help.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: How to use MySqlConnector instead of MySql.Data

Post by HighAley »

Hello,

What version of our tool do you use?

Thank you.
Post Reply