VS2015 an odbc connection mysql console program, in the project properties-use the unicode character set, return IM002, do not use the successful connection?

An odbc connection mysql program. Use the unicode character set in the project property, return IM002, and connect successfully without using it

.

related environment W1064Magi VS2015Mysql8.0

related codes

the connection code using the unicode character set is as follows:
SQLConnect (hdbc, (SQLWCHAR*) "mysql", SQL_NTS, (SQLWCHAR*) "root", SQL_NTS, (SQLWCHAR*) "123456", SQL_NTS);

the connection code that does not apply to the unicode character set is as follows:
SQLConnect (hdbc, (SQLCHAR*) "mysql", SQL_NTS, (SQLCHAR*) "root", SQL_NTS, (SQLCHAR*) "123456", SQL_NTS)

compare the code at both ends, the only difference is the difference between WCHAR and CHAR in the connection field. I tried Google and didn"t get a direct answer, but everything told me about character encoding
so I tried to add
setlocale (LC_ALL, ") to the code;
still didn"t work.

what should I do to solve this problem?

Apr.15,2022
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1be8694-30e3e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1be8694-30e3e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?