Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

inserting into Long Get ORA-01461 (can bind LONG value..)

843854Jan 30 2002 — edited Jul 17 2002
hi.

I have some problem with inserting string value into LONG datatype in oracle.

My environment of system are :
1. sun solaris 2.6(with JDK1.3)
2. oracle 8.0.6
3. JDBC thin driver(for solaris)

The goal is simple.(but it throws exception..)
I want to inert string value(which has enough long length)into LONG datatype in oracle.

I tried by two manners.

First, I used setString() but it throws Exception:ORA-01401(inserted value is too large). I found JDBC thin Driver throws Exception when string value has more than 4000 length.

Second, I used setByte() or setBinaryStream()(<-is correct spelling?). Then it throws ORA-01461 (can bind LONG value.

I know that LONG datatype in oracle can have infinitly many bytes. But i can't..

help me.. thanks for reading..
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 14 2002
Added on Jan 30 2002
4 comments
294 views