Home » Developer & Programmer » Forms » window close (form 10g)
window close [message #463071] Tue, 29 June 2010 11:10 Go to next message
lokeshsurana
Messages: 212
Registered: April 2010
Location: India
Senior Member
i design one master detail block
and one command button for saving the data....

as i click on save button data get saved and after that if i want to close form then at this time it again asking me for save changes window.....


what should need to do.....resolve this problem...?
Re: window close [message #463075 is a reply to message #463071] Tue, 29 June 2010 11:25 Go to previous messageGo to next message
cookiemonster
Messages: 13938
Registered: September 2008
Location: Rainy Manchester
Senior Member
Stop making additional changes?

Oracle keeps track internally of whether or not there are outstanding changes using the record_status and block_status properties.
If you commit your changes oracle will not ask you to save your changes again unless you make additional changes.
This can be due to either:
1) the user modifying the contents of one of the datablock items directly.
2) Some code in some trigger modifying one of the datablock items.

I suspect it's number 2 in your case.
So you need to find the code that's changing the datablock items.

If you can't find the culprit try putting messages in all your triggers to display the :system.block_status variable and see at what point it goes from QUERY to CHANGED - that'll be where the problem code is.
Re: window close [message #463079 is a reply to message #463075] Tue, 29 June 2010 11:31 Go to previous messageGo to next message
lokeshsurana
Messages: 212
Registered: April 2010
Location: India
Senior Member
ya ...I made one additional changes on trigger
after saving data one id is genrated and that id i want store in 3 rd table ....is what i changes....but that id not get stored in 3rd table...?

and form didnt go in query message coming as field must be entered....
Re: window close [message #463081 is a reply to message #463079] Tue, 29 June 2010 11:38 Go to previous messageGo to next message
cookiemonster
Messages: 13938
Registered: September 2008
Location: Rainy Manchester
Senior Member
Well how are you trying to store the id - is this another datablock or are you coding a direct insert/update somewhere?

As for field must be entered - You've started creating a new record in one of the blocks and haven't filled one of the required items.
Re: window close [message #463092 is a reply to message #463081] Tue, 29 June 2010 12:10 Go to previous messageGo to next message
lokeshsurana
Messages: 212
Registered: April 2010
Location: India
Senior Member
ya i miss to put commit......


i resolve that problem by adding that commit...


but query mode probelm still giving same error../
Re: window close [message #463098 is a reply to message #463092] Tue, 29 June 2010 12:19 Go to previous messageGo to next message
cookiemonster
Messages: 13938
Registered: September 2008
Location: Rainy Manchester
Senior Member
lokeshsurana wrote on Tue, 29 June 2010 18:10

but query mode probelm still giving same error../

You'll have to explain that in more detail.
Is this when you try to go into enter-query mode?
Do you do anything in the form before doing this?
This is the field must be entered error yes?
Re: window close [message #463102 is a reply to message #463098] Tue, 29 June 2010 12:32 Go to previous messageGo to next message
lokeshsurana
Messages: 212
Registered: April 2010
Location: India
Senior Member
i have one master detail relation ship form...
on that at header level two fields are mandatory and at line level again two fields mandatory

as i open form and go to query mode it throw error as
Field must be entered....


which thing get wrong..?

Re: window close [message #463112 is a reply to message #463102] Tue, 29 June 2010 13:29 Go to previous messageGo to next message
cookiemonster
Messages: 13938
Registered: September 2008
Location: Rainy Manchester
Senior Member
There's some code in a trigger that is run before you go into enter-query mode. It is doing something to the block in question that is causing the record_status to go to INSERT.
Probably you're populating some field with default values.
Re: window close [message #465188 is a reply to message #463112] Tue, 13 July 2010 02:52 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Sorry that I have been so long in replying. Have you solved your problem?

The code where you have placed the 'commit', is this your own 'insert' or 'update' statement?

How about posting some of your code!

By the way, you will find working with Oracle Forms simpler and faster if you let Forms do the work for you.

David
Previous Topic: LOV filtering records (merged)
Next Topic: To Hide UserName & Password in Reports11g - Urgent
Goto Forum:
  


Current Time: Fri Sep 20 04:29:24 CDT 2024