Oracle Forms 6i – How can I upload large images or any other file (PDF, ZIP, …) from the client PC into a BLOB column
01:19 04 Jun 2025

Environment Oracle Forms 6i (Client/Server, Patch 18)

Oracle Database 12c (BLOB column)

Deployment model Thick client on Windows 10

Network/security End-users connect through a restricted DB account (no direct CREATE DIRECTORY, no UTL_FILE, no DMBS_LOB)

I'm developing a new feature in my Oracle Forms 6i application that consists of adding a new button with which the user selects a file in their client and that file has to be stored in the database.

I got it for the images, using READ_IMAGE_FILE and storing the image in an image item that references a BLOB column in the database:

-- Block item DRV_IMAGEN is bound to a BLOB column
READ_IMAGE_FILE(
    :CARGA_IMAGENES.DRV_FICHERO,     -- Full path chosen with GET_FILE_NAME
    :CARGA_IMAGENES.DRV_TIPDOC,      -- MIME type (e.g. 'JPEG')
    'CARGA_IMAGENES.DRV_IMAGEN'      -- Target image item
);

Works for small photos (≈250 KB). Works for GIF, JPG, PNG if the file is small enough. Image is committed correctly to the BLOB column.

But i'm getting 'Cannot read image file' error with big photos (> 1mb)

Is there something generic in which I can store any file (image, PDF, etc...) and then dump it into a database using forms 6i?

oracleforms