Databases Reference
In-Depth Information
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 application 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 essential 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 .
Figure 6-75. Specifying BLOB settings
In the Settings region, enter MIME_TYPE for MIME Type Column , FILE_NAME for Filename
Column , and Download for Download Link Text .
3.
4.
Click Apply Changes .
Next, alter the report on page 210:
1.
Edit Page 210 of the application.
2.
Edit the Ticket Details region by double-clicking its name.
3.
In the Tasks region, click Convert to SQL Query . When prompted, confirm your action by
clicking OK .
 
Search WWH ::




Custom Search