11.01.2013 Views

Oracle Forms Developer – Form Builder Reference, Volume 1

Oracle Forms Developer – Form Builder Reference, Volume 1

Oracle Forms Developer – Form Builder Reference, Volume 1

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

READ_IMAGE_FILE built-in<br />

Description<br />

Reads an image of the given type from the given file and displays it in the <strong>Form</strong> <strong>Builder</strong> image item.<br />

Syntax<br />

PROCEDURE READ_IMAGE_FILE<br />

(file_name VARCHAR2,<br />

file_type VARCHAR2,<br />

item_id ITEM);<br />

PROCEDURE READ_IMAGE_FILE<br />

(file_name VARCHAR2,<br />

file_type VARCHAR2,<br />

item_name VARCHAR2);<br />

Built-in Type unrestricted procedure<br />

Enter Query Mode yes<br />

Parameters<br />

file_name Valid file name. The file name designation can include a full path<br />

statement appropriate to your operating system.<br />

file_type The valid image file type: BMP, CALS, GIF, JFIF, JPG, PICT, RAS,<br />

TIFF, or TPIC. (Note: File type is optional, as <strong>Form</strong> <strong>Builder</strong> will attempt<br />

to deduce it from the source image file. To optimize performance,<br />

however, you should specify the file type.)<br />

item_id The unique ID <strong>Form</strong> <strong>Builder</strong> assigns to the image item when it creates it.<br />

Use the FIND_ITEM built-in to return the ID to an appropriately typed<br />

variable. Datatype is ITEM.<br />

item_name The name you gave the image item when you created it. Datatype is<br />

VARCHAR2.<br />

Usage Notes<br />

<strong>Form</strong> <strong>Builder</strong> searches for the image file along the same default path as it searches for an .FMX file. For<br />

more information on the specific search path for your platform, refer to the <strong>Form</strong> <strong>Builder</strong> documentation<br />

for your operating system.<br />

READ_IMAGE_FILE examples<br />

/* Read an image from the filesystem into an image item on the<br />

** form. In this example, the scanned picture identification<br />

** for each employee is NOT saved to the database, but is<br />

** stored on the filesystem. An employee’s photo is a TIFF<br />

** image stored in a file named .TIF Each employee’s<br />

** Userid is unique.<br />

** trigger: Post-Query<br />

*/<br />

DECLARE<br />

tiff_image_dir VARCHAR2(80) := ’/usr/staff/photos/’;<br />

photo_filename VARCHAR2(80);<br />

331

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!