This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JDBC and the fly likes Clob Retrieval Effort Failure Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Clob Retrieval Effort Failure" Watch "Clob Retrieval Effort Failure" New topic

Clob Retrieval Effort Failure

bob reilly
Ranch Hand

Joined: Jan 22, 2007
Posts: 44
I'm attempting to retrieve a clob column from an Oracle database. In fact I'm looking to retrieve one clob column from one row in the database. Everything looks good except that with my code:

I'm getting an error condtion on statement: java.sql.Clob desc1 = rs.getclob(1);. // java.sql.Clob cannot be resolved. In fact the getclob method is undefined for type ResultSet. My question - is this a java version issue - or do I need to go in another programming direction. Any comments / URLs would be appreciated.

Thank you...

Rob Spoor

Joined: Oct 27, 2005
Posts: 19655

I see two mistakes there:
1) it's getClob, not getclob; Java is case sensitive
2) your loop body is only line 7, because you didn't use { and }.

That doesn't explain the java.sql.Clob not being found error, unless you're using a Java 1.0 or Java 1.1 compiler (Clob was added in Java 1.2).

I'll move this thread to our JDBC forum. And please UseCodeTags next time.

How To Ask Questions How To Answer Questions
It is sorta covered in the JavaRanch Style Guide.
subject: Clob Retrieval Effort Failure
Similar Threads
Reading CLOB object from Oracle
Question on resultset
Display Of CLOB Data On Web Page
Clob Cyrillic woes
Problem to display clob data