Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Instert String into a Oracle Long Column via JDBC
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
![]() |
![]() |