Hello.
I am trying to learn form and have forms 6i Version 6.0.8.11.3.
I can retrieve all the .tif rows from s_image table from sqlplus. Within the form I have block level When-new-record-instance triggers on S_ord and s_item which call a program unit which contains the following code -
PROCEDURE get_image IS
filename VARCHAR2(20);
BEGIN
filename := get_product_images_item.product_id);
IF filename = 'No file' THEN null;
ELSE READ_IMAGE_FILE(filename, 'tiff', 's_item.product_image');
END IF;
END;
I also have a database stored function with code
CREATE OR REPLACE FUNCTION get_product_image (product_number IN NUMBER) RETURN VARCHAR2 IS
v_filename VARCHAR2(20);
BEGIN
SELECT s_image.filename INTO v_filename
FROM s_image, s_product
WHERE s_image.id = s_product.image_id
AND
s_product.id = product_number;
if v_filename is null then
v_filename := 'No file';
end if;
RETURN v_filename;
EXCEPTION
WHEN no_data_found THEN return('No file');
END;
/
Is it correct that I need to have the photo files(*.tif) stored with a directory on my operating system?
If so how do I do this??
Thanks in advance.
I am trying to learn form and have forms 6i Version 6.0.8.11.3.
I can retrieve all the .tif rows from s_image table from sqlplus. Within the form I have block level When-new-record-instance triggers on S_ord and s_item which call a program unit which contains the following code -
PROCEDURE get_image IS
filename VARCHAR2(20);
BEGIN
filename := get_product_images_item.product_id);
IF filename = 'No file' THEN null;
ELSE READ_IMAGE_FILE(filename, 'tiff', 's_item.product_image');
END IF;
END;
I also have a database stored function with code
CREATE OR REPLACE FUNCTION get_product_image (product_number IN NUMBER) RETURN VARCHAR2 IS
v_filename VARCHAR2(20);
BEGIN
SELECT s_image.filename INTO v_filename
FROM s_image, s_product
WHERE s_image.id = s_product.image_id
AND
s_product.id = product_number;
if v_filename is null then
v_filename := 'No file';
end if;
RETURN v_filename;
EXCEPTION
WHEN no_data_found THEN return('No file');
END;
/
Is it correct that I need to have the photo files(*.tif) stored with a directory on my operating system?
If so how do I do this??
Thanks in advance.