Database Reference
In-Depth Information
Declarative BLOBs
In Oracle, BLOB stands for Binary Large Object and is a data type designed to store
files. APEX has streamlined how you can manage BLOB columns with a feature called
Declarative BLOBs. The APEX wizards recognize a BLOB column and automatically
alter the related APEX item and report to interact seamlessly with the column. Why do
you care about BLOB columns? Using BLOB columns allows you to easily upload and
download files, such as documents, spreadsheets, and images, into your applications.
Plan ahead when using the Declarative BLOBs feature. At design time, include
these columns in tables that will use declarative BLOBs:
FILENAME : Stores the actual file name that is used when a user downloads
the file
MIME_TYPE : Stores the type of the file so browsers know which applica-
tion to launch (Word for .doc , Excel for .xls , and so on)
LAST_UPDATED : Stores the date the BLOB was last updated
CHARACTER_SET : Stores the character set of the BLOB, which is essen-
tial for indexing and processing data that resides within the BLOB
The first two columns are essential for reading data out of the BLOB when needed.
APEX uses the Number/Date format column attribute of the BLOB column to map
these attributes to the BLOB column stored in the database.
If you add a BLOB column after creating a report or form using a wizard, you have
to manually set the column or item properties to integrate BLOB processing.
Because you added a BLOB column to the TICKET_DETAILS table when you ran
the SQL script, some things have been done for you. But you still need to do several
things to use declarative BLOBs properly. First, you have to map the FILE_NAME and
MIME_TYPE columns to the form that is used to upload the document, so these details
are saved in the database. Let's address the form on page 220 first:
1.
Edit Page 220 of the application.
2.
Edit the item P220_ATTACHMENT . In the Settings section, you see the
fields shown in Figure 6-75 .
 
Search WWH ::




Custom Search