Home » Developer & Programmer » Forms » Committing Issue in Forms (Oracle Dev suite 10 G, Win XP.)
Committing Issue in Forms [message #356067] Wed, 29 October 2008 05:12 Go to next message
Vignesh.S
Messages: 2
Registered: October 2008
Junior Member
Hi All,

I have Form A(Master Form) & Form B(Detail Form) (Oracle Dev suite 10 G)

Form A has an Copy button which inserts(DML Insert Statement)[!!!only insert & not commit !!!] an record in a table TABLE1 & Calls Form B with call_form statement (passing the newly inserted ID ) .

When the Form B gets launched it queries the same table (TABLE1) and shows the details of the copied record.

When the Form B is closed, the Form A gets back its focus, again querying the records from TABLE1

Requirement:
When the Form B gets opened with the copied record & when it is closed with out committing (Save button) it should ask for an question " Do you want to save the record ?" with Yes and No Buttons in it.

Problem:
When the Form B is closed with out committing its not asking for "Do you want to save the record ?" alert.

How do we achieve this kind of requirement ??? .

please let me know if you need more information to achieve this kind of requirement. Please help me to solve this as I am new to this technology.

workaround tried so far :
After querying the record in Form B , explicitly edit an item in a database block (like appending an space after an item).
Actual results:
When the Form B gets closed with out commiting its asking for "Do you want to save the record" ? message
When "Yes" is pressed the record gets committed which satisfies the requirement.

But the problem comes here Mad When "No" is pressed then, the Form B gets closed , However, the uncommitted record (pressed No button in Form B)gets listed in Form A after executing the query.

Note: If the form A is relaunched, the same record is not getting listed. (the uncommitted record).

Thanks and let me know if you need more information to provide your insights!!





Re: Committing Issue in Forms [message #356071 is a reply to message #356067] Wed, 29 October 2008 06:01 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
If you don't want to save changes in Form B, then why wouldn't you DELETE that record? Obviously, you don't need it. Also, try to SYNCHRONIZE Form A (after returning from Form B) in order to refresh the screen (or even EXECUTE QUERY in Form A).
Re: Committing Issue in Forms [message #356085 is a reply to message #356071] Wed, 29 October 2008 07:44 Go to previous messageGo to next message
Vignesh.S
Messages: 2
Registered: October 2008
Junior Member
Hi,

Thanks for your reply!,

I don't want to delete the record which I opened in Form B, instead I don't want them to be saved in the TABLE-A.

More explanation:

The moment I pressed the copy button in Form A, a record is inserted in TABLE-A & the newly inserted ID is passed to Form B.
When Form B gets launched it just queries the details based upon the ID which Form A have sent & displays.

Note: At this moment, I haven't committed any thing!!!.

So at this point if I close the Form B with out saving it... it should obviously ask for "Do you want to save.....".

Let me know if you need more information.

With regards to your thoughts on executing query when the focus returns on Form A---- I am already doing this as mentioned earlier.

Thanks!
Re: Committing Issue in Forms [message #356246 is a reply to message #356085] Thu, 30 October 2008 01:31 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Why not just ask the question in the 'when-window-closed' trigger?

Why not use 'set_record_property(,status,changed_status)'?

David
Previous Topic: Order by non-database item
Next Topic: Setup Oracle client on windows vista
Goto Forum:
  


Current Time: Mon Feb 03 14:47:19 CST 2025