My development environment is VS2010 + QT4.8.6 + MYSQL5.6 character set is a database named test in GB2312MYSQL numerical control :! The following figure shows the ((img.ask.csdn.netupload201506051431043200_295110.png) MYSQL character set has been set to GB2312! The following figure shows how to connect QT to the MYSQL driver: (img.ask.csdn.netupload20150605143%3254_356630.jpg). The MYSQL driver has been changed to GB2312... mysqlqt4
My development environment is VS2010 + QT4.8.6 + MYSQL5.6. The character set is GB2312.
MYSQL numerical control is a well-known database for testing:
MYSQL character set has been set to GB2312
The QT connection to the MYSQL driver has been changed to GB2312
My QT program main. CPP has been changed to the GB2312 character set
The code for connecting data in my QT program is as follows:
The following error is returned when the program runs and the prompt characters are garbled.
It is okay to connect to the database with an English name. it cannot be connected to Chinese characters, but because of the name data, it indicates that the field cannot be in Chinese. how can this problem be solved.
Thank you!