Fix ODBC links in Chinese as a question mark (?) The problem

Source: Internet
Author: User
Tags odbc

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

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.