Two Laptop Bag
The moose likes JDBC and Relational Databases 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 REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
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: 20193

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
I agree. Here's the link:
subject: Clob Retrieval Effort Failure
It's not a secret anymore!