• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

use of CLOB,help me.

 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a web based application that allows people to enter biographical info. The users should also be able to access their bio information and make changes. In order to present the data it must be a String.
I am using a database table that defines a bio field as a CLOB data type (Oracle 8i release 8.1.7). I retrieve the value from the database using the ResultSet method getClob storing it a Clob object.
I then convert it to a String object using the Clob method getSubString(). No problem! The problem comes when people try to create new records (INSERT) into the CLOB column and the length > 4000 characters.
I am currently just trying to insert the String value into the CLOB column. This works fine if the length < 4000, but if it is longer then an SQL exception is generated and the insert fails.
How can I convert the String object into a Clob object that can be written to the database?
 
Get off me! Here, read this tiny ad:
professionally read, modify and write PDF files from Java
https://products.aspose.com/pdf/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!