view based datablock [message #641230] |
Wed, 12 August 2015 02:32 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](//www.gravatar.com/avatar/481ad83bfa916e6a93b0af5b8a5f5d53?s=64&d=mm&r=g) |
palpali
Messages: 138 Registered: December 2014 Location: India
|
Senior Member |
|
|
I have view based datablock in my forms
and when i tried to update some filed i get the error:
"FRM-40735: ON-UPDATE trigger raised unhandled exception ORA-00001"
my on-update trigger:
update tab_je
set id = :control_blk.id,
rec_id = :detail_blk.rec_id,
rec_text = :detail_blk.rec_text;
update_record;
on-insert trigger:
Insert into tab_je
(id, rec_id, rec_text)
values
(:control_blk.id, :detail_blk.rec_id, :detail_blk.rec_text);
insert_record;
can anyone please help? how could i solve this?
thanking you.
|
|
|
Re: view based datablock [message #641232 is a reply to message #641230] |
Wed, 12 August 2015 02:35 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
cookiemonster
Messages: 13963 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
Remove update_record and insert_record. They tell forms to create an update/insert statement for the current values in the block. When you've got your own update/insert statement they're counter-productive.
|
|
|
|
|
|
Re: view based datablock [message #641237 is a reply to message #641236] |
Wed, 12 August 2015 03:13 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
cookiemonster
Messages: 13963 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
Considering the block is based on a view it may well be the case that forms doesn't actually know how to lock it, in which case you need to write an on-lock trigger.
|
|
|
|
|
|
|
Re: view based datablock [message #641246 is a reply to message #641245] |
Wed, 12 August 2015 05:54 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](//www.gravatar.com/avatar/481ad83bfa916e6a93b0af5b8a5f5d53?s=64&d=mm&r=g) |
palpali
Messages: 138 Registered: December 2014 Location: India
|
Senior Member |
|
|
ohh sry ..
thank you for your feed back.. LF
but my Problem is, i would like to have all id which are not in tab_je but in two others, thats why i did Union to get These id too.
and I put the whole query start with select...... in FROM Clause Query /Query Data Source Name = my query....
and while compiling this i get the error:
FRM-30409: Delete Record Behavior for the relation is invalid.
FRM-30085: Unable to adjust form for output.
can you please suggest me how can i do this?
thanking you again
[Updated on: Wed, 12 August 2015 05:55] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
Re: view based datablock [message #641258 is a reply to message #641257] |
Wed, 12 August 2015 08:06 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
cookiemonster
Messages: 13963 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
Possibly not if you've got on-insert and on-update.
I suggest you write a select in each of those triggers after the insert/update and use a message to show the current data that's been inserted/updated in the DB. If it shows the correct values but you can't see that data in another session then it's the commit that's missing.
That said - If you're only inserting/updating 1 table then you're probably better off basing the block on table and spending your time working out the correct where clause to apply.
|
|
|
|