isc_blob_set_desc2()
Go Up to API Function Reference
Sets the subtype and character set for a Blob. For more information about Blob descriptors, see Working with Blob Data.
Syntax
ISC_STATUS isc_blob_set_desc2(
ISC_STATUS *status_vector,
unsigned char *table_name,
unsigned char *column_name,
short subtype,
short charset,
short segment_size,
ISC_BLOB_DESC_V2 *desc);
Parameter | Type | Description |
---|---|---|
|
|
Pointer to the error status vector |
|
|
Name of the table containing the Blob column |
|
|
Name of the Blob column in the table |
|
|
Specifies the subtype of the Blob; value are:
|
|
|
Specifies the character set for the Blob. |
|
|
Specifies the segment size for the Blob. |
|
|
Pointer to a Blob descriptor to populate |
Description
isc_blob_set_desc2()
sets the Blob column name, table name, subtype, segment size, and character set for a Blob column to values specified by the application. To set these values to InterBase defaults, use isc_blob_default_desc2()
.
isc_blob_set_desc2()
and three related functions, isc_blob_default_des2c()
, isc_blob_gen_bpb2
(), and isc_blob_lookup_desc2()
provide dynamic access to Blob data. In particular, you can use these functions to define and access information about Blob data for filtering purposes, such as character set information for text Blob data, and subtype information for text and non-text Blob data.
You can manually set the subtype and character set information (for a TEXT
subtype) in a Blob descriptor, by way of a call to isc_blob_set_desc2()
. Pass the subtype, character set, and segment size to the Blob descriptor in your application.
isc_blob_set_desc2()
is useful for setting the contents of the Blob descriptor without querying the system tables for the information. Calls to this function also let an application specify character set and subtype for custom filtering operations.
- Note: The
ISC_BLOB_DESC_V2
structure supports long metadata names of lengthMETADATALENGTH
. The olderISC_BLOB_DESC
structure supports only metadata names of 32 bytes or less. - Note: Do not call this function while running against a V3.x database.
Example
The following example sets the default values for a tour guide application, including subtype, character set, and segment size:
isc_blob_set_desc2(status, "TOURISM", "GUIDEBOOK", 1, 2, 80, &desc);
Return value
isc_blob_set_desc2()
returns the second element of the status vector. Zero indicates success. A nonzero value indicates an error. For InterBase errors, the first element of the status vector is set to 1, and the second element is set to an InterBase error code.
To check for an InterBase error, examine the first two elements of the status vector directly. For more information about examining the status vector, see Handling Error Conditions.