Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Instert String into a Oracle Long Column via JDBC

Instert String into a Oracle Long Column via JDBC

From: Sascha Kiefer <sascha.kiefer_at_pikon.com>
Date: 2 Aug 2001 11:03:56 -0700
Message-ID: <1a4ec7a7.0108021003.610c57d9@posting.google.com>

Hi there,

I´ve got the following Problem:

I want to insert a long String (>4000 Char) into a Long column of a Oracle table. The normal setObject method of a prepared statement seems to have a problem with such long strings. So I tried to do it via Input Streams.

Therefore I tried both following codings:

java.io.StringReader b = new java.io.StringReader(oValue.toString()); ps.setCharacterStream(nIndex,b ,oValue.toString().length());

and

java.io.ByteArrayInputStream b = new java.io.ByteArrayInputStrea (oValue.toString().getBytes());
ps.setAsciiStream(nIndex,b ,oValue.toString().length());

Both ways always return a Oracle Exception: ORA-01861 literal does not match format string

I tried to find out what it means, but the documentation is very poor concerning this point.

Can somebody tell me please waht's wrong with my coding, or maybe with my database. Because I've absolutely no idea where to start search-

Thanks in advance

Sascha Received on Thu Aug 02 2001 - 13:03:56 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US