aspose file tools*
The moose likes JDBC and the fly likes saving nclob data into database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
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: 61766
    
  67

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.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Tim McGuire
Ranch Hand

Joined: Apr 30, 2003
Posts: 820

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: 1321

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..
[Blog][Linkedin] How To Ask Questions On JavaRanch My OpenSource
Muhammad Saifuddin
Ranch Hand

Joined: Dec 06, 2005
Posts: 1321

here is an example.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: saving nclob data into database