Home » Developer & Programmer » Forms » FRM-40735: when-button-pressed trigger raised unhandled exception ORA-01841
FRM-40735: when-button-pressed trigger raised unhandled exception ORA-01841 [message #420164] Thu, 27 August 2009 06:09 Go to next message
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 #420180 is a reply to message #420164] Thu, 27 August 2009 07:32 Go to previous messageGo to next message
cookiemonster
Messages: 12320
Registered: September 2008
Location: Rainy Manchester
Senior Member
When posting code can you please use code tags - see the orafaq forum guide if you're not sure how.

s:=to_date(':prmaloan2.startyearmm','yyyymm');
e:=to_date(':prmaloan2.endyearmm','yyyymm');


Those aren't valid dates you're passing to to_date.
Re: FRM-40735: when-button-pressed trigger raised unhandled exception ORA-01841 [message #421980 is a reply to message #420164] Sat, 12 September 2009 11:18 Go to previous messageGo to next message
Kevin Meade
Messages: 2098
Registered: December 1999
Location: Connecticut USA
Senior Member
also, how about providing the text that goes along with the error message. If you think I am going to look up the meaning or ORA-01841, you are mistaken.

Kevin
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 Go to previous messageGo to next message
bahubcd
Messages: 36
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
Re: FRM-40735: when-button-pressed trigger raised unhandled exception ORA-01841 [message #422582 is a reply to message #420164] Thu, 17 September 2009 08:44 Go to previous messageGo to next message
bahubcd
Messages: 36
Registered: July 2007
Location: Bangalore
Member
Also if you would have used the Exception block for the BEGIN and END Block, then you would have got the exact Error message instead of this unhandled exception message.
Re: FRM-40735: when-button-pressed trigger raised unhandled exception ORA-01841 [message #423085 is a reply to message #422582] Tue, 22 September 2009 01:16 Go to previous message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Have you solved your problem?

David
Previous Topic: A Delete_record does not work
Next Topic: IMPORTANT: Form to export data to MS access and URGENT: Exporting data to MS ACCESS with a form (me
Goto Forum:
  


Current Time: Mon Sep 26 12:54:36 CDT 2016

Total time taken to generate the page: 0.05996 seconds