Insert data in one transaction. [message #415523] |
Tue, 28 July 2009 03:20 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
hrabiabw
Messages: 4 Registered: February 2009
|
Junior Member |
|
|
Lublin, 27 lipca 2009 r.
Hi all,
BACKGROUND:
I've got one form with two tab canvas: OFFER_HEADER(1-row view) and OFFER_CONTENT(n-row view). It's based on two tables. I want to insert new data in one transaction.
PREVIOUS SOLUTION:
User filled header. After that insert was made to the database. Content became visible. Content is filled by records taken from the PRODUCT form. Is was done by inserting record into OFFER_CONTENT and displayed using relation OFFER_HEADER.ID = OFFER_CONTENT.OFFER_HEADER_ID.
ISSUE:
HEADER form is filled and validated. Now user can see CONTENT canvas. How can I fill CONTENT with product? I was using insert statement, but as I want to do it with one transaction I can't do it like that. I have to somehow show the records. How can I pick record from PRODUCTS and display it one the CONTENT canvas without sending sql to the database? What is the most efficient way to give user the possibility to change values on the CONTENT canvas(e.g. Margin for one record, margin for all records etc) without using sql statement?
I'd be grateful for any kind of help,
Best Regards,
Bartek
|
|
|
|
Re: Insert data in one transaction. [message #415548 is a reply to message #415530] |
Tue, 28 July 2009 03:59 ![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) |
hrabiabw
Messages: 4 Registered: February 2009
|
Junior Member |
|
|
Thanks for the quick answer.
Please, feel free to ask. I'll describe all the issues in detail.
1. "what was wrong with your previous (working) solution"
Fundamental rule given by the analyst: We can't keep in the system OFFER_HEADER without OFFER_CONTENT. I've made all the needed code implementation, but for eg. User inserts header. Application won't let him exit the form if at least one product is present in the CONTENT related to the specific HEADER. And then user shut down the computer. After that we've got record in the OFFER_HEADER without OFFER_CONTENT.
2. So for now, my greatest problem is haw to display products in OFFER_CONTENT without using sql statement and related record in OFFER_HEADER.
Thanks in advance,
Best regards,
Bartek
|
|
|
Re: Insert data in one transaction. [message #415705 is a reply to message #415548] |
Tue, 28 July 2009 20:05 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
![](/forum/images/custom_avatars/67467.jpg) |
djmartin
Messages: 10181 Registered: March 2005 Location: Surges Bay TAS Australia
|
Senior Member Account Moderator |
|
|
I can only assume that the header insert is being done manually. If you use standard master/detail Forms structure and have validation at the record level on the detail that stops saving when no information is available then the header information will also not be saved.
David
|
|
|