在数据库连接字符串上加 charset=utf8
<connectionStrings> <add name="XJRDSModels" connectionString="server=192.168.1。。;user id=d;password=Si;persistsecurityinfo=True;database=hs;charset=utf8" providerName="MySql.Data.MySqlClient " /> </connectionStrings>
在数据库连接字符串上加 charset=utf8
<connectionStrings> <add name="XJRDSModels" connectionString="server=192.168.1。。;user id=d;password=Si;persistsecurityinfo=True;database=hs;charset=utf8" providerName="MySql.Data.MySqlClient " /> </connectionStrings>
转载于:https://www.cnblogs.com/shiruina/p/9314558.html