When using OBDC to connect to a database using VS2015, the database can display normally, but output is garbled on vs.
The course table is displayed in the database:
VS Program Results show:
Find the reason because char is read ASCII by default, read only to 127, more than 127 output '? ' So the output of Chinese is a question mark
Then Baidu to find solutions, the original is in the ODBC incoming, the character type is not OK, changed to gb2312 character type
Here's how:
In Control Panel -Administrative Tools -ODBC, find your own ODBC linker
Double-click the ODBC linker you set, go to edit, click Detail, modify the corresponding ODBC linker's character set that you created, and modify the incoming character type read format.
After the modification, back to VS, you can output the Chinese data normally.
Fix ODBC links in Chinese as a question mark (?) The problem