This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JDBC and the fly likes How to write Clob data to oracle database? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "How to write Clob data to oracle database?" Watch "How to write Clob data to oracle database?" New topic
Author

How to write Clob data to oracle database?

ravi bask
Ranch Hand

Joined: Jul 05, 2001
Posts: 58
I wrote a small java code which updates a clob data, when i run the above program , it throws Abstractmethoderror at runtime in rs.getClob(1);
Does anyone know what it is?
Thanks
san
Jamie Robertson
Ranch Hand

Joined: Jul 09, 2001
Posts: 1879

it means that the oracle driver you are using has not implemented the method yet ( doesn't exist ). For information on writing/reading clob's from Oracle see this sample code
Jamie
David Rocks
Ranch Hand

Joined: Apr 24, 2001
Posts: 162
Hi,
I am having a similar problem as to how to get a string into a clob for my oracle database. i can get the clob out ok using..
public String getModel() throws RemoteException {
String returnString = null ;
String line = null ;
try{
Clob clob = (Clob)model ;
BufferedReader clobData = new BufferedReader(clob.getCharacterStream( ));
while((line = clobData.readLine( )) != null){
returnString += line ;
}
}
catch( Exception e ){
e.printStackTrace() ;
throw new RemoteException( e.getMessage() ) ;
}
return returnString ;
}
it is getting the string into the clob that is the problem. I am using JBoss with CMP for the class and oracle but i would like the app to be database independant.
Having looked at the solution i am aware that it is using native oracle code. Is there a way around this to use non vendor specific code?
Thanks for any help in advance.
David
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to write Clob data to oracle database?
 
Similar Threads
how to cast String to Clob ?
Displaying Clob Data in BIRT report
how to create BLOB and CLOB data
Reading data in a CLOB from BIRT report
how to download a zip file from database?