Home » Developer & Programmer » Forms » Field is not updating (Forms 6.0.8)
Field is not updating [message #602833] Mon, 09 December 2013 09:35 Go to next message
bluetooth420
Messages: 146
Registered: November 2011
Senior Member
Need guideline as i am failed to resolve the following situation.

Situation is
:block1 is view based block
:prod is table based block
:block1.chk_ord is a check box.

I have written the following code in when-checkbox-changed

IF :block1.chk_ord ='Y' then
  message(:block1.orddate ); pause;   ------this shows null
 :block1.orddate   := trunc(sysdate);  --problem area, its not updating
  message(:block1.orddate ); pause;   --- this also shows null
 synchronize;
 :prod.orddate		 := trunc(sysdate);   -- this is updating
	
ELSE
 :block1.orddate := null;  -- no affect
 :prod.orddate	 := null;  -- working fine
	
END IF;


My problem is that why :block1.orddate := trunc(sysdate); is not updating :block1.orddate ?

Any tip ?

Thanks

[Updated on: Mon, 09 December 2013 09:41]

Report message to a moderator

Re: Field is not updating [message #602834 is a reply to message #602833] Mon, 09 December 2013 10:03 Go to previous messageGo to next message
cookiemonster
Messages: 13920
Registered: September 2008
Location: Rainy Manchester
Senior Member
can you manually set :block1.orddate?
Re: Field is not updating [message #602835 is a reply to message #602834] Mon, 09 December 2013 10:17 Go to previous messageGo to next message
bluetooth420
Messages: 146
Registered: November 2011
Senior Member
no Sad i can not update manually .

but update allowed is YES at block level and item level.
and also have tried SET_ITEM_PROPERTY('BLOCK1.orddate',UPDATEABLE,PROPERTY_TRUE); in the trigger.
Re: Field is not updating [message #602839 is a reply to message #602835] Mon, 09 December 2013 10:38 Go to previous messageGo to next message
cookiemonster
Messages: 13920
Registered: September 2008
Location: Rainy Manchester
Senior Member
are you getting an error when you try and update it?
Re: Field is not updating [message #602840 is a reply to message #602839] Mon, 09 December 2013 10:40 Go to previous messageGo to next message
bluetooth420
Messages: 146
Registered: November 2011
Senior Member
no;

though system.message_level :=0; in post query trigger as per my requirement
Re: Field is not updating [message #602842 is a reply to message #602840] Mon, 09 December 2013 10:43 Go to previous messageGo to next message
cookiemonster
Messages: 13920
Registered: September 2008
Location: Rainy Manchester
Senior Member
Is the view updatable? Can you update it in sqlplus?
Re: Field is not updating [message #602844 is a reply to message #602842] Mon, 09 December 2013 10:56 Go to previous messageGo to next message
bluetooth420
Messages: 146
Registered: November 2011
Senior Member
well, this is the base story of designing this form. The view is not updatable as pr following error

"ORA-01779: cannot modify a column which maps to a non key-preserved table".

But i was thinking to temporary fill the field and will not commit the :block1.orddate as :prod.orddate is being saved.


is this the reason of not updating at form level BEFORE COMMIT???
Re: Field is not updating [message #602847 is a reply to message #602844] Mon, 09 December 2013 11:02 Go to previous message
bluetooth420
Messages: 146
Registered: November 2011
Senior Member
thanks cookiemonster for your guidance.

I have made orddate2 (a display field) in block1 and achieved my target.

Just a new learning poing that ORA-01779 does not allow updation even at form level even before committing.

Previous Topic: Object library
Next Topic: Oracle Forms 6i - Export issue in UNIX server to Win client
Goto Forum:
  


Current Time: Wed Apr 24 10:00:53 CDT 2024