Home » Developer & Programmer » Forms » ORA-01446 on-update
ORA-01446 on-update [message #223429] Thu, 08 March 2007 20:06 Go to next message
tnegrey
Messages: 10
Registered: July 2005
Location: Calgary Co-op
Junior Member
Hello,

I'm using an 'On-Update trigger' to replace the default Form Builder processing for updated records. When I try to change a column in the form I get:
ORA-01446: cannot select ROWID from, or sample, a view with DISTINCT, GROUP BY, etc.

The on-update doesn't fire. How do I get around this. The block is based on a view.
Re: ORA-01446 on-update [message #225420 is a reply to message #223429] Mon, 19 March 2007 22:36 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Have you solved your problem?

Please post your code. Also, search this forum for 'user_updatable_columns'.

David
Re: ORA-01446 on-update [message #225871 is a reply to message #225420] Wed, 21 March 2007 15:44 Go to previous messageGo to next message
tnegrey
Messages: 10
Registered: July 2005
Location: Calgary Co-op
Junior Member
I did not solve this problem. I'm still looking, thanks for the information on the 'user_updatable_columns'.

I don't want the form to update the view. If possible, I would like the user to be able to change the columns on the form and the 'new entered data' would be sent to a function (java script) which does the actual update of the tables.
Re: ORA-01446 on-update [message #225915 is a reply to message #225871] Wed, 21 March 2007 23:01 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
If you don't want to do an update, why are you DOING an update?

PLEASE POST THE CODE OF YOUR ON-UPDATE TRIGGER.

David
Re: ORA-01446 on-update [message #226464 is a reply to message #223429] Fri, 23 March 2007 20:42 Go to previous messageGo to next message
tnegrey
Messages: 10
Registered: July 2005
Location: Calgary Co-op
Junior Member
Hello,

What I mean is: I don't want the form to execute the DML 'update' automatically. I want the user to be able to change a column on the form and have the 'on-update trigger' call a java script to perform the DML update.

This is my understanding; if you use an 'on-update trigger' the form should fire that trigger for an update not the forms default process for an update. This is the code:

fnd_Message.set_name 'fnd',:c_per_employee_discipline_v.employee_number);
fnd_message.show;

c_per_discipline.initialize (:C_PER_EMPLOYEE_DISCIPLINE_V.EMPLOYEE_NUMBER,
:C_PER_EMPLOYEE_DISCIPLINE_V.DATE_ADMINISTERED);

c_per_discipline.updateenddate
(:C_PER_EMPLOYEE_DISCIPLINE_V.DATE_START,
:C_PER_EMPLOYEE_DISCIPLINE_V.DATE_END);


It doesn't fire this trigger (nor does it file the pre-update). As soon as you enter the column to change it the error appears.

I have experimented with the block and report properties with no success. Embarassed
Re: ORA-01446 on-update [message #226903 is a reply to message #226464] Mon, 26 March 2007 21:07 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Why don't you use VB?

David
Re: ORA-01446 on-update [message #226907 is a reply to message #226903] Mon, 26 March 2007 21:46 Go to previous messageGo to next message
tnegrey
Messages: 10
Registered: July 2005
Location: Calgary Co-op
Junior Member
Visual Basic?


We are a Java shop and eventually will convert all Oracle forms to JSP.


Oracle forms is not capable of doing what I'm asking?
Re: ORA-01446 on-update [message #226948 is a reply to message #226907] Tue, 27 March 2007 00:23 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
It just seems such a waste of time. Just write your Java stuff and stop trying to twist forms to do things it wasn't designed to do.

David
Re: ORA-01446 on-update [message #475818 is a reply to message #226948] Fri, 17 September 2010 16:48 Go to previous messageGo to next message
lopesr
Messages: 1
Registered: September 2010
Junior Member

Hello all!

I suppose that tnegrey don't need this anymore, but I was suffering from the same problem and I found a workaround for it.

This "problem" occurs at the ON-LOCK trigger of the block. When the query data source is a complex view (with distinct or group by), it's not possible to get the rowid to lock the record.

So, if you create a new ON-LOCK trigger (overwriting the default), you can develop your own treatment to lock the record that you will update (or use a simple "null;" statement Shocked ).

[]'s
Tocha.
Re: ORA-01446 on-update [message #475827 is a reply to message #475818] Fri, 17 September 2010 21:51 Go to previous message
wency
Messages: 450
Registered: April 2006
Location: Philippines
Senior Member

Is your block from a query that is DISTINCT? Then you cannot do that.
Previous Topic: multi values for one single record (student_id)
Next Topic: Frm-18108 failed to load the following objects
Goto Forum:
  


Current Time: Mon Dec 05 14:38:55 CST 2016

Total time taken to generate the page: 0.08533 seconds