Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

File Browse Insert file as BLOB into DB

BaonergesJun 30 2015 — edited Jul 16 2015

Hello,

I am selecting a file with the file browser and am trying to insert it into the database. The following is my simple insert procedure.

BEGIN

insert into OFATTACH values(1, '12345', 'txt', :P100_A3, sysdate, 'E-548', utl_raw.cast_to_raw(:P100_A3));

END;

The file browser is P100_A3. My issue is that when I insert utl_raw.cast_to_raw(:P100_A3), it insert the file name in the BLOB column. How do I reference the content of the file in P100_A3 and insert it into the blob column? Also is there any method to get mime type or would I be better off parsing it? Thank you for any help.

This post has been answered by fac586 on Jun 30 2015
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 13 2015
Added on Jun 30 2015
12 comments
4,184 views