WHEN-MOUSE-DOUBLECLICK with more than 1 result rows [message #85522] |
Tue, 06 July 2004 01:56 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
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 ??
|
|
|
|
|