update table data from HTML form in PLSQL

393 Views Asked by At

I'm trying to update user input field on click of a button in html form. so far my html form should call another procedure inside my package on click of the 'Update ID' button.However, i'm just receiving system error and no data is exactly being updated into the field.
Input field id is 'localid' and the table is called GENERAL.GORADID and the column name is goradid_additional_id. However, for some reason i'm able to call the procedure with the click of the btn but the column on the table does not update.

-- button to submit in in plsql -- this button in a procedure called (p_gre_id)

htp.formopen('BANINST1.HWKZLISS.P_UPDATE_ID','post');
htp.formsubmit('','Update ID');
htp.formclose;

-- the update code -- in a procedure called (p_update_id)

CURSOR C_UPDATE IS
        SELECT
            GORADID_ADDITIONAL_ID, 
            GORADID_PIDM,
            SPRIDEN_PIDM
        FROM GENERAL.GORADID, SATURN.SPRIDEN
        WHERE GORADID_ADDITIONAL_ID IN localid
        AND SPRIDEN_ID IN bannerid
        AND SPRIDEN_CHANGE_IND IS NULL;

BEGIN

     FOR REC IN C_UPDATE LOOP
     IF localid IS NOT NULL THEN 
     UPDATE GENERAL.GORADID
     SET GORADID_ADDITIONAL_ID = localid 
     WHERE GORADID_PIDM = SPRIDEN_PIDM;

     COMMIT;
     END IF;    
     END LOOP; 
0

There are 0 best solutions below