Quantcast
Channel: MySQL Forums - Connector/NET and C#, Mono, .Net
Viewing all articles
Browse latest Browse all 1447

How can I get MySqlCommand to play nicely with .NET Core? (3 replies)

$
0
0
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?

Viewing all articles
Browse latest Browse all 1447

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>