An error occurred while inserting a datagram string into the CLOB attribute of the Oracle database.

Source: Internet
Author: User

An error occurred while inserting a datagram string into the CLOB attribute of the Oracle database.

Insert an article (1000 ~ 2000.

Stream processing is not used on the Internet. This is like a Bug. You only need to extend the inserted data to more than 2000 by default.

The following code is used:

If (temp. length () >=1000) & (temp. length () <= 2000) {temp = StringUtils. rightPad (temp, 2008 );}

Use the StringUtils rightPad method to make the part that does not exceed 2000, and automatically fill in 0 on the right until the length is 2008.

(One half-width character, one byte, and one full-width character, so the Chinese character is 1000-2000, while the English character is 2000-4000)
Don't hurry say have no choice, perhaps, next intersection will meet hope.


How to insert clob type big data in oracle

In fact, the string type in the database has the maximum length limit, and clob is no exception.
The limit on the string type is generally 8192 bytes, And the length cannot be put in.
You can put the content in a file. Here, the file address is put.
 
In an oracle10g Database, when hibernate writes the clob field, the data volume is small and can be written normally. When the data volume is large, the following error is reported:

Are there some special characters in your inserted content?
 

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.