Odd problem (Block based on View) [message #130043] |
Wed, 27 July 2005 19:06 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
Tafer
Messages: 64 Registered: July 2005 Location: Here!
|
Member |
|
|
Introduction:
Forms 6i Patch #13, Windows XP SP2
"Complex" view with "instead of" trigger. (View_X):
- 2 tables.
- Outer Join. (With one table)
- Function (In the Where, pretty complex)
Another not so complex view with "instead of" Trigger. (View_Banana):
- 1 Table.
- Function (In the Select, could be substituted with a join)
2 Blocks, one based in View_X (Block_X) and the other based on View_Banana (Block_Banana).
What I'm doing:
Block/layout Wizard to create the blocks, nothing else.
Problem:
Block_Banana: allows inserts, updates, deletes without problem.
Block_X: FRM-40602 Cannot insert into or update data in a view
Now, View_X - Outer Join = No problem.
But, View_X + Outer Join = 2 delightful days of endless pain. (Of course, the Outer Join is necessary)
Any help?
[Updated on: Wed, 27 July 2005 19:08] Report message to a moderator
|
|
|
|
Re: Odd problem (Block based on View) [message #130174 is a reply to message #130050] |
Thu, 28 July 2005 09:48 ![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) |
Tafer
Messages: 64 Registered: July 2005 Location: Here!
|
Member |
|
|
Sorry, I didn't mention this before, but I can update the view without problem through normal SQL. (Store Procedures/Function/Packages, etc...)
And when I search the USER_UPDATABLE_COLUMNS for the respective view, every single column is in condition to be inserted/modified/deleted.
I'll try the search function, but any help will be greatly appreciated.
Edit:
I checked the previous threads about updatable views, and I couldn't find anything useful.
I can't use the post-query triggers, because in this specific form, time is extremely important.
Now, I found a workaround to this problem, but I don't want to use it. (Because it add extra coding to the form that is already on the Instead of trigger)
The idea is to create the on_lock/on_update/on_delete triggers (Insert is not Necessary).
[Updated on: Thu, 28 July 2005 10:14] Report message to a moderator
|
|
|
|
Re: Odd problem (Block based on View) [message #130226 is a reply to message #130222] |
Thu, 28 July 2005 19:26 ![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) |
Tafer
Messages: 64 Registered: July 2005 Location: Here!
|
Member |
|
|
djmartin wrote on Thu, 28 July 2005 19:17 | Verify that the item definitions in block_x and block_banana have insert and update turned on.
If you have the same column names in both views then you could try just changing the data source for the block instead of having two blocks. In that way when testing the form's update capability you know that you have the same item definitions.
David
|
View_X and View_Banana are completely different. (And so are the blocks)
I was using View_Banana for testing updatable views. But view_x is the important.
|
|
|
|
Re: Odd problem (Block based on View) [message #130361 is a reply to message #130043] |
Fri, 29 July 2005 09:31 ![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) |
Tafer
Messages: 64 Registered: July 2005 Location: Here!
|
Member |
|
|
Insert and update are allowed.
Hey!, Thanks anyway... I had to implement the ON_LOCK/ON_UPDATE/ON_DELETE form triggers to do what I wanted.
Sad stuff:
ON_UPDATE:
begin
update view_x
set ...;
end;
|
|
|
|