writing clobs using oracle thin driver

C

Cookie Monster

Hi,

I have a problem with the oracle thin driver writing clobs greater then 4000
chars. Basically using the oci driver the following java code works fine:

PreparedStatement statement;
Reader bodyReader = null;
try {
bodyReader = new StringReader(parameter.toString());
statement.setCharacterStream(1,bodyReader,parameter.toString().length());
} catch (Exception e) {
e.printStackTrace();
throw new SQLException("Failed to set text field.");
}

But when using with the thin driver nothing gettings written to the clob.
Does anyone know a solution to this problem where I can use the thin driver
for writing clobs??

Thanks,
Steve.
 
S

steve

Hi,

I have a problem with the oracle thin driver writing clobs greater then 4000
chars. Basically using the oci driver the following java code works fine:

PreparedStatement statement;
Reader bodyReader = null;
try {
bodyReader = new StringReader(parameter.toString());
statement.setCharacterStream(1,bodyReader,parameter.toString().length());
} catch (Exception e) {
e.printStackTrace();
throw new SQLException("Failed to set text field.");
}

But when using with the thin driver nothing gettings written to the clob.
Does anyone know a solution to this problem where I can use the thin driver
for writing clobs??

Thanks,
Steve.


don't be lazy.
1.go look at the ask tom, section on the oracle website.
2. download the sample code from oracle website.
both are free.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top