How can I get MySqlCommand to play nicely with .NET Core?
Posted by: Michael Rogers
Date: October 02, 2020 03:20PM

I've got a .NET Framework program that I'm trying to run on .NET Core. It uses MySql 4.5.4. When I try and open a connection:

MySqlConnection conn = new MySqlConnection(connectionStringToDB);
conn.Open();
it crashes on the conn.Open() line with this exception:

WpfApp2 Error: 0 : 'Windows-1252' is not a supported encoding name.
For information on defining a custom encoding, see the documentation for the Encoding.RegisterProvider method. (Parameter 'name')
Exception thrown: 'System.ArgumentException' in MySql.Data.dll An unhandled exception of type 'System.ArgumentException' occurred in MySql.Data.dll
'Windows-1252' is not a supported encoding name. For information on defining a custom encoding, see the documentation for the Encoding.RegisterProvider method.

I'm out of my depth -- can anyone shed light on this, and how to get around it?

Options: ReplyQuote


Subject
Written By
Posted
How can I get MySqlCommand to play nicely with .NET Core?
October 02, 2020 03:20PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.