Newbie Upoad PDF to blob then Delete File.pdf

I want the user to upload A PDF and import it into A BLOB.
That part is working.
If the user uploads the WRONG PDF, I want them to be able to delete the FILEA.PDF.
They can delete the FILEA.PDF, if they wait 4 or 5 minutes.
Delete the FileA.PDF is the part that is not working, if the user does it in less
than 4 or 5 minutes.
The PDF is about 60K.
Below is the sample code:
=========================
<code>
SELECT mypdf
INTO temp_blob
FROM fcsImpactUpload
where renname= 'FileB.PDF'
FOR update;
IF dbms_lob.fileexists(src_file)=1 THEN
dbms_lob.fileopen(src_file, dbms_lob.file_readonly);
lgh_file := dbms_lob.getlength(src_file);
dbms_lob.loadfromfile(temp_blob, src_file, lgh_file);
UPDATE fcsImpactUpload
SET de_pdf = temp_blob
where renname= 'FileB.PDF';
COMMIT;
END IF;
UTL_FILE.FGETATTR('AIMSORAPDF', 'FileA.PDF', DOESEXIST, FLEN, BSIZE);
IF DOESEXIST THEN
UTL_FILE.FREMOVE('AIMSORAPDF','FileA.PDF');
ELSE
EXIT; -- File does not exist
END IF;
</code>

Forget to say verasion
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Prod
PL/SQL Release 10.2.0.4.0 - Production
"CORE     10.2.0.4.0     Production"
TNS for 32-bit Windows: Version 10.2.0.4.0 - Production
NLSRTL Version 10.2.0.4.0 - Production

Similar Messages

Maybe you are looking for

  • Date error ORA-01843: not a valid month

    Hi, I am in a 4.01 Apex environment with NLS_DATE_FORMAT     mm/dd/yyyy. I created a view with a CASE statements using 'when eventstartdate between '08/15/2010' and '06/1/2011' then...' clauses and the view is created fine. I also can query the view

  • Moving photos between projects

    I'm having a problem - erratically - moving photos from one project to another. When I select one photo & drag it to a different project - the entire project gets moved instead of just the one selected photo. (I've double checked that there are no ph

  • Few condition types missing in Outline agreements

    Hi, In PO, I am getting all conditions but in outline agreements (either contract or sch.agreement) few are missing. How to get all conditions in Outline agreements? Regards, Sattuj

  • Process Flow showing as busy - though Complete

    Hi, A Process Flow is stuck because one mapping had only two out connections - OK, and Error, but no 'OK with Warning' route. The Process Flow was then moved forward by using 'Expediate'. The Process Flow completed, but the Status in the Runtime Audi

  • Download Assist with Error 0

    How do I get pas the download assistant when it keeps coming up with error 0? This is for the trial version of CS6 Design Web Version.