About ignore record when commit [message #679581] |
Tue, 10 March 2020 07:39 |
|
compuscience
Messages: 97 Registered: September 2012
|
Member |
|
|
I need to ask about
I have Oracle forns 6i
And i create cursor to return data when i open the form
I put degree for each record then save it each record
I need to save only record which i out degree in it
And ignore which i didn't put in it
How can i do that
|
|
|
Re: About ignore record when commit [message #679591 is a reply to message #679581] |
Tue, 10 March 2020 10:05 |
cookiemonster
Messages: 13962 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
Forms will save any records that are marked as changed.
They get marked as changed when you modify a datablock item, even if you set the item to the value it was already.
So don't modify items where nothing has changed.
If you want an explanation of how to do that in your case you will need to post the code you're running.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: About ignore record when commit [message #679651 is a reply to message #679648] |
Thu, 12 March 2020 06:36 |
cookiemonster
Messages: 13962 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
Do you think that maybe you should have pointed that out at the start?
So you're opening a form.
The form has a datablock based on one table
You are populating this block with data from another table
You are then letting users enter a value for the value field.
You want to save all records where users have entered a value to the table the block is based on.
Does that describe the functionality you want?
If so, that's how you should have presented the issue in the first place.
This really just begs the question - why are two tables involved here? Why not just one?
|
|
|
|
Re: About ignore record when commit [message #679654 is a reply to message #679653] |
Thu, 12 March 2020 07:34 |
cookiemonster
Messages: 13962 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
That's not an explanation of why you have two tables.
It's just a statement that you have two tables.
What is the relationship between the 2 tables?
If it's 1 to 1, as it would appear to be, then you should combine them into one table and everything becomes simple.
|
|
|
|
Re: About ignore record when commit [message #679659 is a reply to message #679655] |
Thu, 12 March 2020 08:30 |
cookiemonster
Messages: 13962 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
Populating a modifiable block the way you're doing is a major pain.
You can try basing the block on a view - outer-join the two tables
then have an instead of update trigger on view that will insert/update the table the block is based on at the moment.
If that doesn't work base the block on a procedure.
But the best solution in the long run is likely to be combining the two tables into one, unless there's a particularly good reason why you need two.
|
|
|