When you use myodbc or mysqldrivercs to connect to the MySQL database for MySQL connector net to use the correct connection string, you only need to enter the Database Host address, database name, database access account, and database access password.
However, this is not the case with MySQL connector net.
When using the "host = localhost; database = test; uid = root; Pwd =;" string to connect to MySQL, the Chinese characters saved to the database always become similar ??? That meike Xingwen. Puzzled, it is suspected that MySQL 4.1.x uses the UTF-8 character set to save the data problem, so in exchange for MySQL 4.0.22. Try again. the problem persists. It seems that the problem lies in MySQL connector net. Open the MySQL connector net help, go to the mysqlconnection section, and find the answer line by line. The result shows that there is a charset-or character set parameter in the parameter list. Parameters are described as follows:
Specifies the character set that shoshould be used to encode all queries sent to the server. resultsets are still returned in the character set of the data returned.
It turns out that ......
Change the connection string to "host = localhost; database = test; uid = root; Pwd =; charset = gb2312" and try again. OK. Everything is normal now!
PS: when accessing MySQL 4.1.x using the new phpMyAdmin version, a connection character set is displayed. At that time, I changed my mind and found that there was no change (because the accessed database, data tables, and fields were both in English-_-|. Now think about it, it should be something like this charset parameter.