From: "Craig R. McClanahan" <cmcclanahan@mytown.net>
Subject: Re: LONG to long in Oracle?
Date: 1998/02/02
Message-ID: <34D63268.1BFA235B@mytown.net>#1/1
Content-Transfer-Encoding: 7bit
References: <34D61AE0.399667D3@fzi.de>
Mime-Version: 1.0
To: Wassili Kazakos <kazakos@fzi.de>
Content-Type: text/plain; charset=us-ascii
Organization: MyTown Network, Incorporated
Newsgroups: comp.lang.java.databases,comp.databases.oracle.misc



As you might assume (because you got the same error in SQL*Plus), this
restriction comes from Oracle, not Java or JDBC.  Oracle restricts the
length of a VARCHAR2 column to a maximum of 2000 characters.  If you want
more than that, use a LONG column (or one of the other variants if you want
to store binary data) instead.

Wassili Kazakos wrote:

> Hi,
>
> I'm trying to store a long text (grater than 2000 chars) in an Oracle
> DB, but I get the message ORA-01704 String literal to long. The
> explanation is "quoted strings may not contain more than 2000
> characters". Does this make sense? Is there an other possibility to
> store long text files in a LONG field? Or have I to cut it in 2000 CHAR
> pieces?
>
> I try to do this from an java application, but I get the same error with
> sqlplus...
>
> thanks in advance
> Wassili





