Home » Developer & Programmer » Forms » clear_item (oracle 10g forms, windows 7)
clear_item [message #590373] Wed, 17 July 2013 09:22 Go to next message
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 Go to previous messageGo to next message
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 Go to previous message
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
)

Previous Topic: D2KWUTIL need help to upload a file from client do Aplication server.
Next Topic: Menu is hiding when i call a form from another form
Goto Forum:
  


Current Time: Thu Apr 25 02:44:47 CDT 2024