FRM-40735: when-button-pressed trigger raised unhandled exception ORA-01841 [message #420164] |
Thu, 27 August 2009 06:09 |
simcky
Messages: 38 Registered: July 2009
|
Member |
|
|
hello to all
i m getting this error FRM-40735: when-button-pressed trigger raised unhandled exception ORA-01841
and the trigger i had written is like this:-
DECLARE
CURSOR I IS SELECT SANCDATE,REFNO,PRINCIPALAMT,SANCAMT,TOTINSTALMENT,RATERECOVERY,AMTRECOVERED,INSTALMENTRECOVERED,
STARTYEARMM,ENDYEARMM
FROM PRMALOAN
WHERE EMPNO=:PRMALOAN.EMPNO
AND EARNINGDEDUCTION=:PRMALOAN.EARNINGDEDUCTION
AND PAYCALPERIOD IS NULL;
d date:=to_date('200908','yyyymm');
s date;
e date;
BEGIN
go_block('prmaloan2');
OPEN I;
LOOP
FETCH I INTO :PRMALOAN2.SANCDATE,:PRMALOAN2.REFNO,:PRMALOAN2.PRINCIPALAMT,:PRMALOAN2.SANCAMT,:PRMALOAN2.TOTINSTALMENT,
:PRMALOAN2.RATERECOVERY,:PRMALOAN2.AMTRECOVERED,:PRMALOAN2.INSTALMENTRECOVERED,:PRMALOAN2.STARTYEARMM,:PRMALOAN2.ENDYEARMM;
s:=to_date(':prmaloan2.startyearmm','yyyymm');
e:=to_date(':prmaloan2.endyearmm','yyyymm');
if
e is null
then
:prmaloan2.TEXT_ITEM164:=months_between(d,s);
exit when I%notfound;
next_record;
end if;
end loop;
close I;
END;
please help me to remove this error
|
|
|
|
|
Re: FRM-40735: when-button-pressed trigger raised unhandled exception ORA-01841 [message #422581 is a reply to message #420164] |
Thu, 17 September 2009 08:42 |
bahubcd
Messages: 40 Registered: July 2007 Location: Bangalore
|
Member |
|
|
simcky,
First try to run the code that you have written for the Button Press in SQL PLUS by assuming some of the values and see where exactly is the error.
OR
put alert messages from BEGIN to END at each and every line and print a different hardcoded number in that alert message each time. And while you run your form try to see in between what alert messages you are getting that message. This would help you to narrow down to the exact line that is causing an error.
I guess the error is might be due to Lines
s := to_date(':prmaloan2.startyearmm', 'yyyymm');
e := to_date(':prmaloan2.endyearmm', 'yyyymm');
Also i dont understand why are you using next_record. This will not fetch you the next record in the cursor. Try using cursor for loop.
Next time kindly indent the code before you submit for our better reading.
Regards,
Bahubcd
|
|
|
|
|