Page 1 of 2

How to use MySqlConnector instead of MySql.Data

Posted: Fri May 21, 2021 3:50 pm
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.

Re: How to use MySqlConnector instead of MySql.Data

Posted: Mon May 24, 2021 2:54 pm
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.

Re: How to use MySqlConnector instead of MySql.Data

Posted: Tue May 25, 2021 2:45 pm
by kvasserman
Thank you, Lech.

Re: How to use MySqlConnector instead of MySql.Data

Posted: Tue May 25, 2021 9:15 pm
by Lech Kulikowski
Hello,

You are welcome.

Re: How to use MySqlConnector instead of MySql.Data

Posted: Tue Jun 08, 2021 1:59 pm
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?

Re: How to use MySqlConnector instead of MySql.Data

Posted: Tue Jun 08, 2021 4:47 pm
by Lech Kulikowski
Hello,

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

Thank you.

Re: How to use MySqlConnector instead of MySql.Data

Posted: Tue Jun 08, 2021 9:56 pm
by Fcampero
we are using this package

"Stimulsoft.Reports.Web.NetCore" Version="2020.4.2"

Re: How to use MySqlConnector instead of MySql.Data

Posted: Fri Jun 11, 2021 1:06 pm
by Lech Kulikowski
Hello,

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

Thank you.

Re: How to use MySqlConnector instead of MySql.Data

Posted: Wed Oct 05, 2022 6:45 am
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.

Re: How to use MySqlConnector instead of MySql.Data

Posted: Wed Oct 05, 2022 6:58 pm
by HighAley
Hello,

What version of our tool do you use?

Thank you.