Re: ORA-01461 on update to VARCHAR2(3000)

Alvaro Coronel <[email protected]>
Newsgroups gmane.comp.jakarta.turbine.torque.user
Message-ID <[email protected]>
The problem can be the character set. You may be sending 3000 characters and the DB will store 9000 bytes.

Check Oracle's character set:

SELECT VALUE FROM v$nls_parameters WHERE PARAMETER = 'NLS_CHARACTERSET';

then configure your client accordingly.

Sincerely,
Álvaro

P.S. No I don't know this. Just googled ORA-01461 and found this post (spanish)

http://oraclenotepad.blogspot.com/2007/05/ora-01461-can-bind-long-value-only-for.html

but I _have_ seen trouble w/Oracle.

--- On Wed, 10/8/08, Brendan Miller <[email protected]> wrote:
From: Brendan Miller <[email protected]>
Subject: ORA-01461 on update to VARCHAR2(3000)
To: [email protected]
Date: Wednesday, October 8, 2008, 1:13 PM

We have an existing table we have newly wrapped with a Torque object
model by adding it to our schema.  It has three VARCHAR2(3000) fields
which we have modeled as 

 <column name="CERT_STRING" size="3000"
type="VARCHAR"/>

When performing an update to an object fetched from this table, we 
receive:

ORA-01461: can bind a LONG value only for insert into a LONG column

It looks like this comes from Village somewhere (I can provide the stack
trace, if you'd like).  This is Oracle 9i.

I tried using LONGVARCHAR, but it maps to the same .setString in
Village's Value class.  I really couldn't tell where Torque/Village
could be messing up, so maybe this is an Oracle thing.

Has anyone ran into this kind of problem before?

Brendan

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.