meta data for this page
  •  

Subtype (Blob)

Subtypes are specified for blobs. They are used to categorize the data type when defining blobs. A subtype is a positive or negative numerical value, which indicates the type of blob data. The following subtypes are predefined in Firebird/InterBase®:

Subtype Meaning
0 Standard blob, non-specified binary data (image, video, audio, whatever)
1 Text blob, e.g. memo fields (basic character functions work)
2 BLR (used for definitions of Firebird procedures, triggers, etc.)
Text Alternative for defining subtype 1
Positive value Reserved for InterBase®
Negative value User-defined blob subtypes

User applications should only use subtypes 0, 1 and negative values.

Blob fields can be specified using the Domain Editor or the Table Editor (started from the IBExpert DB Explorer).

The specification of a user-defined blob subtype has no effect upon Firebird/InterBase®, as the Firebird/InterBase® server treats all blob fields the same, i.e. it simply stores the data and delivers it to the client program when required.

The definitions are however required by the client programs in order to display the blob content correctly. For example, SUB_TYPE -200 could be defined as a subtype for GIF images and SUB_TYPE -201 as a subtype for JPG images.

Subtype specification is optional; if nothing is specified, Firebird/InterBase® assumes 0 = binary data.

As mentioned above, under the menu item Tools, the IBExpert Blob Viewer/Editor can display blob contents as text, hex, images, RTF, Unicode and web pages.