//CharacterSet=utf8;
static string M_str_sqlcon = "server=127.0.0.1;user id=root;password=root;database=test;CharacterSet=utf8;";
指定连接字符串的字符集即可,最关键的就是 ”CharacterSet=utf8;“ 因为我的数据库设置的字符集是utf8所以这里连接时的字符集就是utf8
//CharacterSet=utf8;
static string M_str_sqlcon = "server=127.0.0.1;user id=root;password=root;database=test;CharacterSet=utf8;";
指定连接字符串的字符集即可,最关键的就是 ”CharacterSet=utf8;“ 因为我的数据库设置的字符集是utf8所以这里连接时的字符集就是utf8