Home » Developer & Programmer » Forms » error 00604 in forms 4.5
error 00604 in forms 4.5 [message #84626] |
Wed, 07 April 2004 02:37 |
Josphat Kioko
Messages: 9 Registered: April 2004
|
Junior Member |
|
|
I have program units in forms 4.5 which do execute well at times but when the records in review are many, i get this
error 00604
what is the cause and how can it be solved
---the code is as follows
----------------------------------------------THIS PART GETS DIFFERENCE IN MONTHS FROM ONE PAYMENT TO THE OTHER
DECLARE
V_1 NUMBER(7) :=0;
V_2 NUMBER(15,2):=0;
V_3 NUMBER(15,2) :=0;
v_4 NUMBER(15,2) :=0;
V_5 NUMBER(15,2) :=0;
V_6 NUMBER(15,2) :=0;
V_7 varchar2(15) :='0';
V_8 NUMBER(15,2) :=0;
v_9 number(15,2);
v10 number(35,10) := ROUND(1/12,10);
V11 number(15,2) ;
V12 DATE;
V14 DATE;
V13 NUMBER(13,2);
V15 number(5);
CURSOR UPLO IS
SELECT REF,OBAL,amount,ID,INTRATE,last_day(PAYDATE) FROM t.t_MANUAL_POSTINGS_CAL
where nvl(ref,0)>1 and officer=user
ORDER BY ID, REF;
BEGIN
OPEN UPLO;
LOOP
FETCH UPLO INTO V_1,V_2,V_3,V_7,V11,V12;
EXIT WHEN UPLO%NOTFOUND;
---V13 :=V12;
uPDATE t.t_MANUAL_POSTINGS_CAL
SET NOOFMONTHS=mONTHS_BETWEEN(v12,last_day(paydate))
WHERE NVL(REF,0) = V_1-1 and id = V_7 and officer=user;
COMMIT;
CLEAR_MESSAGE;
END LOOP;
--END IF;
--END LOOP;
EXCEPTION
WHEN NO_DATA_FOUND
THEN
MESSAGE ('EVERYTHING IS OK');
CLEAR_MESSAGE;
CLOSE UPLO;
END;
SYNCHRONIZE;
-------------------------------------------puts interest per month
-------------------------------------------CALCULATES INTEREST ON OUTSTANDING BALANCE
SELECT 'PATIENCE PLEASE...started interest/bal cal!..POp up signals end of processing' INTO :DISP FROM DUAL;
DECLARE
V_1 NUMBER(7) :=0;
V_2 NUMBER(15,2):=0;
V_3 NUMBER(15,2) :=0;
v_4 NUMBER(15,2) :=0;
V_5 NUMBER(15,2) :=0;
V_6 NUMBER(15,2) :=0;
V_7 varchar2(15) ;
V_8 NUMBER(15,2) :=0;
v_9 number(15,2);
v10 number(35,10) := ROUND(1/12,10);
V11 number(15,2) ;
V12 NUMBER(15,2) :=0;
V13 NUMBER(15,2);
v14 number(15,2) :=0; ---interest hold
v15 number(15,2) :=0; ---balance hold
v16 number(15,2) :=0; ---ipart hold
V20 VARCHAR2(18) :='T';
CURSOR UPLO IS
SELECT NVL(REF,0),NVL(OBAL,0),NVL(amount,0),ID,INTRATE,nvl(NOOFMONTHS,1) FROM t.t_MANUAL_POSTINGS_CAL
WHERE OFFICER=USER
ORDER BY ID,REF;
BEGIN
OPEN UPLO;
LOOP
FETCH UPLO INTO V_1,V_2,V_3,V_7,V11,V12;
EXIT WHEN UPLO%NOTFOUND;
if v_7<>v20 AND V_1=1 then
v20 :=v_7;
V_4 :=V_2-V_3;
v16 :=ROUND((((v_4)*POWER((1+V11/100),v10*V12)-V_4)/V12),2);
v15 :=v_4;
ELSE
select obal,INTRATE,nvl(NOOFMONTHS,1) into v_4,V11,V12 from t.t_MANUAL_POSTINGS_CAL
where NVL(ref,0) = V_1 - 1 AND ID = V_7 and officer=user;
select nvl(amount,0) into v_3 from t.t_MANUAL_POSTINGS_CAL
where NVL(ref,0) = V_1 AND ID = V_7 and officer=user;
v15 := ROUND((v_4)*POWER((1+V11/100),v10*V12),2)-v_3; -------obal
v14 :=ROUND((v_4)*POWER((1+V11/100),v10*V12),2)-V_4; ---accrued interest
v16 :=ROUND((((v_4)*POWER((1+V11/100),v10*V12)-V_4)/V12),2); --ipart
END IF;
UPDATE t.t_MANUAL_POSTINGS_CAL
SET OBAL = v15,ACCRUED_INT =v14,IPART=v16
WHERE NVL(REF,0) =V_1 AND ID = V_7 and officer=user;
--END IF;
COMMIT;
CLEAR_MESSAGE;
synchronize;
END LOOP;
CLOSE UPLO;
END;
SYNCHRONIZE;
----the results of the above are inserted into other tables then deleted
why does it run ok at times and does not at other times
the same seems to run ok on sql prompt
|
|
|
Goto Forum:
Current Time: Sun Aug 18 02:14:13 CDT 2024
|