Populating a Blob Descriptor

From InterBase
Jump to: navigation, search

Go Up to Working with Blob Data


There are four possible ways to populate a Blob descriptor, as follows:

  • Call isc_blob_default_desc2(). This stores default values into the descriptor fields. The default subtype is 1 (TEXT), segment size is 80 bytes, and charset is the default charset for your process.
  • Call isc_blob_lookup_desc2(). This accesses the database system metadata tables to look up and copy information for the specified Blob column into the descriptor fields.
  • Call isc_blob_set_desc2(). This initializes the descriptor from parameters you call it with, rather than accessing the database metadata.
  • Set the descriptor fields directly.

The following example calls isc_blob_lookup_desc2() to look up the current subtype and character set information for a Blob column named PROJ_DESC in a table named PROJECT. It stores the information into the source descriptor, ­from_desc.

isc_blob_lookup_desc2 (
status_vector,
&db_handle; /* Set by previous isc_attach_database() call. */
&tr_handle, /* Set by previous isc_start_transaction() call. */
"PROJECT", /* Table name. */
"PROJ_DESC", /* Column name. */
&from_desc, /* Blob descriptor filled in by this function call. */
&global ) /* Global column name, returned by this function. */

For more information about the usage of Blob descriptors in applications that request data filtering, and for further examples of populating Blob descriptors, see Writing an Application that Requests Filtering.

Advance To: