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!

Should I use Empty_BLOB() or null?

KatReedMay 11 2018 — edited May 12 2018

I am currently using Oracle Apex 5.1.2.

I created a table in the database that contains a column that can hold a BLOB data type, a column for filename, and a column for MIME type.

In my APEX application, I have a File Browse page item. The intent for this page item is to allow the end-user to attach a file to the page. This part works perfectly - the user is able to browse for a file using that item and attach it to a page and later download the file in order to view it.

The problem: I want the end-user to be able to delete the attachment if they need to and, if they'd like, attach another file in its place. My idea is to create a button and in the settings for the button set the Action to "Submit Page" and the Database Action to SQL Update Action. Then I will create a page process of type PL/SQL code and set the Server-side Condition in the settings for the process to occur when the button I created is pressed. In the PL/SQL code section of the process, it appears from the research I have done that I have one of two options:

UPDATE table_name SET blob_column = EMPTY_BLOB() WHERE my_id = id

OR:

UPDATE table_name SET blob_column = null WHERE my_id = id

I have already tried both of these options and they both work, but I don't know which option is better for what I am trying to achieve. I have tried to research this problem, but unfortunately I can't find the exact answer I am looking for. Does anyone have any recommendations?

Thank you in advance.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 9 2018
Added on May 11 2018
2 comments
3,633 views