• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to write Clob data to oracle database?

 
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 1879
MySQL Database Suse
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
reply
    Bookmark Topic Watch Topic
  • New Topic