Mysql-abnormal connection to Mysql5.6 Chinese database name of QT4.8.6

Source: Internet
Author: User
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!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.