DurgaSrinivas_886836 wrote:As your block is not based on a table, what exactly you are trying to achieve by a commit? are you triggering a particular event and updating database tables with control block values? This could be done by writing appropriate codes with KEY-COMMIT trigger
I have a non database block in form. so when i change a value, form is unable to identify these changes(message shows as "no changes to save"). so when i update the values of this block i want the updated values to be committed. Can u you suggest me how we can identify these changes and proceed to commit them .
You can write a code with ON-ERROR trigger to suppress 'Nothing to save' and override it with your own set of messages.
if :controlblock.column = 'SOMETHING' then insert into my_table(col1,col2, col3) values('a',1000,'b'); update my_table set col1=:controlblock.column; end if; COMMIT;
The above is a specific method, as you already did a commit to the database by issuing the Commit
DECLARE alert_button NUMBER; lv_errtype VARCHAR2(3) := MESSAGE_TYPE;l v_errcod NUMBER := MESSAGE_CODE; lv_errtxt VARCHAR2(80) := MESSAGE_TEXT; BEGIN IF lv_errcod = 40401 THEN MESSAGE('Record Saved'); END IF; END;