aspose file tools
The moose likes JDBC and the fly likes saving nclob data into database Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "saving nclob data into database" Watch "saving nclob data into database" New topic
Author

saving nclob data into database

mahesh kapure
Greenhorn

Joined: Sep 17, 2008
Posts: 6
hi,

i am having nclob datatype of one column in the table.

when i am trying to insert the values into, it will save till first line of text. it didnt save other lines of text. the code to save lines is

StringReader reader = new StringReader(mutilinetext);
statement.setCharacterStream(1, reader, mutilinetext.length());

please help.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56168
    
  13

Please take the time to choose the correct forum for your posts. This forum is for questions on Servlets. For more information, please read this.

This post has been moved to a more appropriate forum.

[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
Tim McGuire
Ranch Hand

Joined: Apr 30, 2003
Posts: 819

I can't reproduce this. Can you post a sample of the multi-line text you are using and the full code (inside code tags)?

also, the versions of DB, jdbc driver, and of Java you are using
Muhammad Saifuddin
Ranch Hand

Joined: Dec 06, 2005
Posts: 1318

mutilinetext is the object of what ?

if it is a File Object.. then .length() method is return long, while setCharacterStream() accept int for length.

hope it helps.


Saifuddin..
[Linkedin] How To Ask Questions On JavaRanch My OpenSource
Muhammad Saifuddin
Ranch Hand

Joined: Dec 06, 2005
Posts: 1318

here is an example.
 
I agree. Here's the link: http://jrebel.com/download
 
subject: saving nclob data into database
 
Similar Threads
problem saving the content of a file to a NClob column
Equivalent field for nclob in java
storing NCLOB in oracle 9i
storing NCLOB in Oracle 9i
Retrieving NCLOB data