My Oracle Support Banner

How to Read and Write CLOB Columns with Different APIs Using Different Versions of the Oracle JDBC Driver (Doc ID 872859.1)

Last updated on MARCH 12, 2024

Applies to:

JDBC - Version 9.2.0.1 and later
Information in this document applies to any platform.

Goal

This document explains all APIs currently available to read from CLOB columns and to write to CLOB columns and the relationship of the APIs to distinct versions of the Oracle JDBC Driver and JDBC specifications.

NOTE:  In this article, all configuration details like server names,  usernames, instance names, schema names, domain names, etc. used in the  images and examples below represent a fictitious sample for clarity or  are default installation values.  These and any value placeholder values  including the  which may surround the placeholders should be  replaced by the actual values used in your environment. Any similarity  to actual environments, past or present, or users, living or dead, is  purely coincidental and not intended in any manner.

Solution

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Goal
Solution
 1. Proprietary Locator Based CLOB API Of The Oracle JDBC Driver (available since Oracle JDBC Driver 8.1.x)
 2. Proprietary Locator Based CLOB API Of The Oracle JDBC Driver With Temporary LOB Enhancement (available since Oracle JDBC Driver 9.0.1)
 3. JDBC Standard API For The Data Type LONGVARCHAR
 4. JDBC Standard API PreparedStatement.setString(...) and ResultSet.getString(...) Used On CLOBs
 5. JDBC 3.0 Standard API For The Data Type CLOB
 6. JDBC 3.0 Standard API For The Data Type CLOB With Proprietary Temporary LOB Enhancement
 7. JDBC 3.0 Standard API For The Data Type CLOB With JDBC 4.0 Enhancement To Initially Create a Temporary LOB
References

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.