The following update is not updating my table. It is stating the following error message when submitting:
ORA-01403: no data found
I have made sure all the fields are input with some data, but it still states the following error of there being no data. any ideas or help?
DECLARE
l_upload_size INTEGER;
l_upload_blob BLOB;
l_image_id NUMBER;
l_image ORDSYS.ORDImage;
l_name VARCHAR2(100);
l_address VARCHAR2(100);
l_postcode VARCHAR2(100);
l_description VARCHAR2(100);
BEGIN
--
-- Get the BLOB of the new image from the APEX_APPLICATION_TEMP_FILES (synonym for WWV_FLOW_TEMP_FILES)
-- APEX 5.0 change from APEX_APPLICATION_FILES which has been deprecated
-- APEX_APPLICATION_TEMP_FILES has fewer columns and is missing doc_size
--
SELECT
blob_content
INTO
l_upload_blob
FROM
apex_application_temp_files
WHERE
name = :P3_filename;
--
-- Insert a new row into the table, initialising the image and
-- returning the newly allocated image_id for later use
--
UPDATE bars
SET
image_id = :P3_IMAGE_ID,
filename = :P3_FILENAME,
image = ORDSYS.ORDImage(),
name = :P3_NAME,
address = :P3_ADDRESS,
postcode = :P3_POSTCODE,
description = :P3_DESCRIPTION
WHERE
image_id = l_image_id;
-- find the size of BLOB (get doc_size)
l_upload_size := dbms_lob.getlength(l_upload_blob);
-- copy the blob into the ORDImage BLOB container
DBMS_LOB.COPY( l_image.SOURCE.localData, l_upload_blob, l_upload_size );
-- set the image properties
l_image.setProperties();
create_blob_thumbnail(l_image_id);
END;