A phenomenon that is found when Java reads a database field

Source: Internet
Author: User

Found in the morning a network called "Handsome!" is no need for a reason "of a person, in the background can only see" Handsome! is no need to Reason "," by "word is not displayed.

The analysis found that in the Access database, the name of this field is 15, because I know that in access, the length of 15 represents the maximum 15 characters that can be stored in Chinese or English. But "Handsome!" There is no reason why "only 8 characters are displayed when only 7 are displayed."

I think maybe because in Java JDBC, the length of a Chinese character is equal to the length of two English characters, according to the set length of 15 in the table, so only 7 characters are read out.

This is just my speculation, and that's what the reality shows.

A phenomenon that is found when Java reads a database field

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.