Home » Developer & Programmer » Forms » WHEN-MOUSE-DOUBLECLICK with more than 1 result rows
WHEN-MOUSE-DOUBLECLICK with more than 1 result rows [message #85522] Tue, 06 July 2004 01:56 Go to next message
hudo
Messages: 165
Registered: May 2004
Senior Member
Hello

I've displayed scott.emp on canvas-tab1. By doubleclicking on a row I'd like to have the result (depending on the condition) on canvas-tab2.
Therefore I use the WHEN-MOUSE-DOUBLECLICK Trigger:

-------------------------------------------------------------
DECLARE
the_button_pressed VARCHAR2(1);
my_current_value_emp VARCHAR(10);

cur_blk VARCHAR2(40) := :SYSTEM.CURSOR_BLOCK;
cur_rec NUMBER;
--top_rec NUMBER;
bk_id BLOCK;

BEGIN

bk_id := FIND_BLOCK( cur_blk);
cur_rec := GET_BLOCK_PROPERTY( bk_id ,CURRENT_RECORD);

my_current_value_emp := :EMP.SAL;

the_button_pressed := :SYSTEM.MOUSE_BUTTON_PRESSED;

GO_BLOCK('EMP1');
CLEAR_BLOCK(NO_VALIDATE);

SELECT empno ,ename ,job ,mgr ,sal ,comm ,deptno
INTO :EMP1.EMPNO, :EMP1.ENAME, :EMP1.JOB ,:EMP1.MGR ,:EMP1.SAL,:EMP1.COMM ,:EMP1.DEPTNO
FROM EMP
WHERE sal = TO_NUMBER(my_current_value_emp);

--END IF;
END;
------------------------------------------------------------

If there is just 1 row as result everything is fine, if there are more result-rows ORA-01422 is raised.
Why is there a problem with more then 1 result-row ?? How can I solve this Problem ??
Re: WHEN-MOUSE-DOUBLECLICK with more than 1 result rows [message #85523 is a reply to message #85522] Tue, 06 July 2004 02:10 Go to previous messageGo to next message
Himanshu
Messages: 457
Registered: December 2001
Senior Member
Hudo,
Please refer to the other Forum in which you particiapate.
I have psoted a reply for your query over there.

Regards
Himanshu
Re: WHEN-MOUSE-DOUBLECLICK with more than 1 result rows [message #85524 is a reply to message #85523] Tue, 06 July 2004 02:59 Go to previous message
hudo
Messages: 165
Registered: May 2004
Senior Member
@Himanshu: Thanks for your quick reply. It's a fine solution.
Previous Topic: Doubt in Forms9i
Next Topic: Forms 11i Template Error
Goto Forum:
  


Current Time: Fri Sep 06 13:38:43 CDT 2024