clear_item [message #590373] |
Wed, 17 July 2013 09:22 |
|
thelearner
Messages: 133 Registered: April 2013 Location: INDIA
|
Senior Member |
|
|
Hi,
I created two blocks DUM(non-database block),DEPT2(database block).
In Dept2 i have columns deptno,dname,loc,image.
In DUM i have (LOCATION) text item and (SAVE)Push button.
In push button i written the code read_image_file( :DUM.LOCATION, 'JPG', 'DEPT2.IMAGE' );
From DUM.LOCATION i am taking the text like path for the image and storing in the database.
It is saving normally.
But my problem is
When i am going to next record of DEPT2 the DUM.LOCATION is showing the previous string.
I want to clear the text item DUM.LOCATION when i changed the record then only it should clear the text item.
I tried this code in push button(SAVE) when-button-pressed
read_image_file( :DUM.LOCATION, 'JPG', 'DEPT2.IMAGE' );
COMMIT;
go_ITEM('DUM.LOCATION');
clear_item;
but it is clearing the item when i press the Button save.
I want when i changed the record in DEPT2 block then only DUM.LOCATION should be clear.
how to do this.
Please tell me which trigger is used in which level.
Thanks & Regards,
The Learner.
[Updated on: Wed, 17 July 2013 09:26] Report message to a moderator
|
|
|
Re: clear_item [message #590397 is a reply to message #590373] |
Wed, 17 July 2013 12:41 |
joy_division
Messages: 4963 Registered: February 2005 Location: East Coast USA
|
Senior Member |
|
|
I find your explanations difficult to understand and visualize, but WHEN-NEW-RECORD-INSTANCE is used for...well...pretty self explanatory.
|
|
|
Re: clear_item [message #590406 is a reply to message #590373] |
Wed, 17 July 2013 14:51 |
|
thelearner
Messages: 133 Registered: April 2013 Location: INDIA
|
Senior Member |
|
|
I am adding table and .FMB file
CREATE TABLE SCOTT.DEPT2
(
DEPTNO NUMBER(2),
DNAME VARCHAR2(14 BYTE),
LOC VARCHAR2(13 BYTE),
IMAGE BLOB
)
|
|
|