Error while appending data to a data block [message #617334] |
Fri, 27 June 2014 09:13 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](//www.gravatar.com/avatar/19734cb67f27f646b870e14acd1791f9?s=64&d=mm&r=g) |
nilanjanpal
Messages: 8 Registered: May 2014 Location: Kolkata
|
Junior Member |
|
|
I have data block, which fetches data directly from a view in the database. After it fetches the data, my code manually adds few records to that dataset which is already fetched from the view into the data block. I am able to do that successfully.
I have a double-click trigger attached to the block. So when I double click the trigger fires and function properly. But before thr trigger fires I am getting a pop up message that "Do you want to save the changes you have made ?
". There are three options in the pop up "Yes, No, Cancel". If I press cancel, it satys in the current window, but if I press Yes/No(doesn't matter), ther trigger attached to the item functions properly and goes to the next window.
Anyone has any idea why the error is coming ? Is it due to the data I am manually adding to the data block. Please help if anyone faced this before.
Thanks!
|
|
|
Re: Error while appending data to a data block [message #617335 is a reply to message #617334] |
Fri, 27 June 2014 09: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) |
cookiemonster
Messages: 13963 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
nilanjanpal wrote on Fri, 27 June 2014 15:13
Anyone has any idea why the error is coming ? Is it due to the data I am manually adding to the data block.
Yes.
As far as forms is concerned any data that isn't got via execute_query is new/changed data and the DB needs to updated to reflect the changes.
nilanjanpal wrote on Fri, 27 June 2014 15:13I have data block, which fetches data directly from a view in the database. After it fetches the data, my code manually adds few records to that dataset which is already fetched from the view into the data block. I am able to do that successfully.
Why are you doing this? Why not modify the view to return all the data you need, or if the view is used elsewhere create a new one?
|
|
|
|
Re: Error while appending data to a data block [message #617385 is a reply to message #617381] |
Sat, 28 June 2014 06:17 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
![](/forum/images/custom_avatars/72104.gif) |
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
Create another view, such as
create view my_view as
select <column_list>
from <some_tables>
where <conditions_here>
UNION ALL
select <column_list>
from <some_tables@over_database_link>
where <conditions_here>
Then base data block on MY_VIEW.
On the other hand, what do you plan to do with these records, once you retrieve them into the form? Will you just view (i.e. SELECT) them, or do you plan to update them, delete, possibly insert new records? Selects are trivial, but all the other actions will be rather complex (consider INSTEAD OF trigger).
|
|
|