Path: newssvr20.news.prodigy.com!newsmst01.news.prodigy.com!prodigy.com!in.100proofnews.com!in.100proofnews.com!news-out.visi.com!petbe.visi.com!newsfeed2.dallas1.level3.net!news.level3.com!crtntx1-snh1.gtei.net!news.gtei.net!newsfeed1.easynews.com!easynews.com!easynews!sn-xit-02!sn-xit-01!sn-post-01!supernews.com!corp.supernews.com!not-for-mail
From: Daniel Morgan <damorgan@x.washington.edu>
Newsgroups: comp.databases.oracle.server
Subject: Re: Perplexing ORA-01461
Date: Fri, 12 Dec 2003 12:02:25 -0800
Organization: ATS
Message-ID: <1071259254.443540@yasure>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)
X-Accept-Language: en-us, en
MIME-Version: 1.0
References: <Rw8Cb.664397$6C4.311032@pd7tw1no> <1071252079.66421@yasure> <3uoCb.675402$6C4.288381@pd7tw1no>
In-Reply-To: <3uoCb.675402$6C4.288381@pd7tw1no>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Cache-Post-Path: yasure!unknown@oracle.advtechserv.com
X-Cache: nntpcache 2.4.0b5 (see http://www.nntpcache.org/)
X-Complaints-To: abuse@supernews.com
Lines: 84
Xref: newssvr20.news.prodigy.com comp.databases.oracle.server:250013

Haximus wrote:
> "Daniel Morgan" <damorgan@x.washington.edu> wrote in message
> news:1071252079.66421@yasure...
> 
>>Haximus wrote:
>>
>>
>>>I'm working on a Forms 9i application, the db used is Oracle9i
> 
> Enterprise
> 
>>>Edition 9.2.0.4.0 running on RedHat AS 3.0.  I keep getting an ORA-01461
>>>error, which is defined as "can bind a LONG value only for insert into a
>>>LONG column."  The perplexing part is none of the columns in the table
> 
> being
> 
>>>inserted are defined as LONG, nor are any of the variables I'm using.
> 
> I've
> 
>>>searched metalink and tried some of the suggested fixes but no joy.
>>
>>How about CLOB? BLOB? etc? What data types do you have?
> 
> 
> This is the table definition itself:
> 
> --- snip ---
> create global temporary table tree (
>  id number not null primary key,
>  parent_id number,
>  rid rowid,
>  seq number,
>  selected char(1),
>  type char(1),
>  state number,
>  label varchar(100),
>  value number,
>  block varchar(30),
>  item varchar(30),
>  branch varchar(100),
>  options varchar(10),
>  expr1 varchar(1000),
>  expr2 varchar(1000),
>  expr3 varchar(1000),
>  check ( type in ('F','R') ),
>  check ( state between -1 and 1 )
> )
> on commit preserve rows;
> --- unsnip ---
> 
> The offending code looks something like this (edited for brevity);
> 
> --- snip ---
> procedure insert_node(pnode tree%rowtype) is
>     cnode tree%rowtype;
> begin
>     -- assign some values to pnode
>     select seq.nextval into cnode.id;
>     cnode.parent_id := pnode.id;
>     cnode.type := 'F';
>     cnode.selected := 'N';
>     cnode.state := 0;
>    ...
>     insert into tree values (cnode); -- <<<< this is where the ORA-01461
> occurs
>     ...
> end;
> --- unsnip ---

I'd suggest you start with the following query:

SELECT keyword
FROM v$reserved_words
WHERE keyword IN ('ID', 'TYPE');

-- 
Daniel Morgan
http://www.outreach.washington.edu/ext/certificates/oad/oad_crs.asp
http://www.outreach.washington.edu/ext/certificates/aoa/aoa_crs.asp
damorgan@x.washington.edu
(replace 'x' with a 'u' to reply)

