Home » Developer & Programmer » Forms » Refresh Block based on View Post Update (Forms 6i)
Refresh Block based on View Post Update [message #291536] Fri, 04 January 2008 14:29 Go to next message
Steve Corey
Messages: 336
Registered: February 2005
Location: RI
Senior Member
Good afternoon -

I have a question regarding the following scenario:

If I allow a user to execute a DML statement via a WHEN-BUTTON-PRESSED trigger and then want the data on the screen to refresh with the newly committed data and the block is built on top of a view, is there an easier way to do it then with the following pseudo-code?

.... dynamic update statement executed via FORMS_DDL
IF FORMS_SUCCESS THEN
  COMMIT;
ELSE
  ROLLBACK;
END IF;

l_where_string := 'WHERE person_id = '||v_person_id||'''';

SET_BLOCK_PROPERTY('BLOCKNAME', DEFAULT_WHERE, l_where_string);
EXECUTE_QUERY;


It appears that in addition to setting the block property's WHERE clause, I must also issue an addition FORMS_DDL statement that recreates the view to avoid returning stale data. Can anyone provide a simpler solution, or is this all I have to work with?

Thanks,
Steve
Re: Refresh Block based on View Post Update [message #291538 is a reply to message #291536] Fri, 04 January 2008 14:45 Go to previous message
Steve Corey
Messages: 336
Registered: February 2005
Location: RI
Senior Member
Nevermind, I made a careless mistake. I forgot the GO_BLOCK command prior to setting the WHERE clause property. Confused
Previous Topic: getting message when execute query
Next Topic: to set background color
Goto Forum:
  


Current Time: Thu Dec 08 16:18:35 CST 2016

Total time taken to generate the page: 0.05309 seconds