Home » Developer & Programmer » Forms » ORA-01461 when updating a LONG-Column via trigger (Forms 10.1.2.0.2, DB 10.2.0.1.0)
ORA-01461 when updating a LONG-Column via trigger [message #463986] Mon, 05 July 2010 09:45 Go to next message
DirkHamburg
Messages: 5
Registered: May 2009
Location: Hamburg
Junior Member
Hi!
I have a non-base-table item which I want to update in the pre-update trigger of the current block.

If the content of the field exceeds 4000 characters, i get the error message

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

The code is

update tab set long_col = :formsblock.long_col
where tab.tabpk = :formsblock.foreign_tabpk;


Workarounds would be,
1.) to delete the old dataset and insert the new one:

delete from tab 
where tab.tabpk = :formsblock.tabpk;

insert into tab (tabpk, long_col) values
(:formsblock.foreign_tabpk, :formsblock.long_col);


or 2.) to change the Item from a non-database item to a database item and use the internal update of the forms-module, but both workarounds are not very satisfying.

Do you know another way to update the LONG-column within the pre-update trigger (or any other PL/SQL part of forms)?

Thank you!

Greetings,

Dirk Schröder
Re: ORA-01461 when updating a LONG-Column via trigger [message #463987 is a reply to message #463986] Mon, 05 July 2010 10:06 Go to previous messageGo to next message
cookiemonster
Messages: 13938
Registered: September 2008
Location: Rainy Manchester
Senior Member
Use a CLOB instead?
LONG is desupported you know.

Also what's the down side of option 2?
Re: ORA-01461 when updating a LONG-Column via trigger [message #464118 is a reply to message #463987] Tue, 06 July 2010 06:08 Go to previous message
DirkHamburg
Messages: 5
Registered: May 2009
Location: Hamburg
Junior Member
Hi!


We migrated from forms 6 to Forms10, so we don't want to change all of the modules, as needed for solution #2.

We will change the table column from LONG to CLOB, then an update will work fine.

Thanks a lot!

Dirk
Previous Topic: Record Selecting in LOV shows in form
Next Topic: sending email to yahoo or gmail from forms 10g
Goto Forum:
  


Current Time: Fri Sep 20 04:58:03 CDT 2024