CLOB inserting data into Oracle database error problem

Source: Internet
Author: User

Inserting an article (1000~2000) into the Clob property of a database today in a project will report an error with a string that is too long.

The internet says to deal with the stream, not to do so. This is like a bug, as long as the inserted data, the default expansion to more than 2000 is OK.

Here's the code:

if ((Temp.length () >=1000) && (Temp.length () <=2000){            temp=stringutils.rightpad (temp, 2008 );  }

Use StringUtils's Rightpad method to make no more than 2000 of the parts, automatically fill 0 on the right until 2008 length.

(one half-width character, one byte, one full-width character two bytes, so kanji 1000-2000, and English 2000-4000)

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.