Replies

ctid1830215
11 Aug 2023, 14:59

RE: RE: RE:Hello, how exactly did you set up the connection? Can you show the part of the code?

 

//Install Nuget package  MySqlConnector

 

using MySqlConnector;

 

 

 MySqlConnectionStringBuilder _mySqlConnectionString = new MySqlConnectionStringBuilder();
               _mySqlConnectionString.Server = ParmMySqlHost;
               _mySqlConnectionString.UserID = ParmMySqlUser;
               _mySqlConnectionString.Password = ParmMySqlPassword;
               _mySqlConnectionString.Database = ParmMySqlDatabase;
               _mySqlConnectionString.Port = 3306; // this is hardcoded because "uint" type is not supported by cTrader


       MySqlDBConnection = new MySqlConnection(MySqlConnectionString);
                   MySqlDBConnection.Open();

 

 

Hello, how exactly did you set up the connection? Can you show the part of the code?
THX

 

 

ctid1830215 said: 

Just wanted to provide an update on the issue.

To resolve the problem I faced, I replaced the Nuget packge from Oracle "MySql.Data.MySqlClient""  with "MySqlConnector"

Link : NuGet Gallery | MySqlConnector 2.2.6

So, any developer who has a problem connecting to MySql database with .Net 6.0 in cBot, try using "MySqlConnector" Nuget package. Just delete Oracle package and replace with "MySqlConnector". No code changes needed.

I have no idea what's wrong with Oracle package and .Net 6.0, it used to work with .Net 4.x.

Best regards

 

 

 

 


@ctid1830215

ctid1830215
07 Jun 2023, 22:23

RE:

Just wanted to provide an update on the issue.

To resolve the problem I faced, I replaced the Nuget packge from Oracle "MySql.Data.MySqlClient""  with "MySqlConnector"

Link : NuGet Gallery | MySqlConnector 2.2.6

So, any developer who has a problem connecting to MySql database with .Net 6.0 in cBot, try using "MySqlConnector" Nuget package. Just delete Oracle package and replace with "MySqlConnector". No code changes needed.

I have no idea what's wrong with Oracle package and .Net 6.0, it used to work with .Net 4.x.

Best regards

 

 


@ctid1830215

ctid1830215
22 Feb 2023, 22:56

RE:

Hi Support team,

Any update if cTrader (.Net6.0) supports MySQL connectivity. Please provide an yes or no answer. 

If the answer is Yes, please update what changes are needed in code from .Net 4.x to .Net 6.0 code migration. 

 

Thank you and really I appreciate a response.

 

 


@ctid1830215

ctid1830215
21 Feb 2023, 16:43

RE:

DelFonseca said:

up

try this

private void myDropList_SelectedIndexChanged(object sender, ComboBoxSelectedItemChangedEventArgs e)

{

 string selectedValue = e.SelectedItem;

switch (selectedValue)

{

   ...

}

}


@ctid1830215