Understanding the Blob Parameter Buffer
A Blob parameter buffer (BPB) is needed whenever a filter will be used when writing to or reading from a Blob.
The BPB is a char array variable, specifically declared in an application, that contains the source and target subtypes. When data is read from or written to the Blob associated with the BPB, InterBase will automatically invoke an appropriate filter, based on the source and target subtypes specified in the BPB.
If the source and target subtypes are both 1 (
TEXT), and the BPB also specifies different source and target character sets, then when data is read from or written to the Blob associated with the BPB, InterBase will automatically convert each character from the source to the target character set.
A Blob parameter buffer can be generated in one of two ways:
- Indirectly, through API calls to create source and target descriptors and then generate the BPB from the information in the descriptors.
- Directly by populating the BPB array with appropriate values.
If you generate a BPB via API calls, you do not need to know the format of the BPB. But if you wish to directly generate a BPB, then you must know the format.
Both approaches are described in the following sections. The format of the BPB is documented in the section about directly populating the BPB.