Access database INSERT into failed

Source: Internet
Author: User
Tags array length sprintf

Once you manipulate the Access database and insert a single piece of data, it always fails, as follows:

    by assignment, a field is cleared, and the final confirmation is that there is a problem at the Userage field.

    later, suspect that the database support for numeric fields is not good, the Userage field instead of the string (%s), but the test found that the effect is the same as%d, Assignment "20", the database can be inserted successfully, the assignment of "199" failed to insert. found that 20:199 less than one byte can succeed, so suspect is sprintf formatted string more than 128 bytes, the array length 128 to 512, insert the Access database 199 success, and insert other values also succeeded.

Final conclusion: The array length is too short, that is, the sprintf formatted string exceeds 128 bytes, causing the execution of the SQL statement to fail.

































Access database INSERT into failed

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.