Using BLOBs with VARCHAR Data

From InterBase

Go Up to Defining BLOB Data Types


All BLOB sub-types can be used interchangeably with VARCHAR data. However, with BLOB SUB_TYPE 1, the BLOB is considered to have a character type, essentially making the BLOB a CLOB data type. For BLOB columns of SUB_TYPE 1, the server converts character data to the column’s character type before inserting, updating or comparing the data. For all other sub-types, the BLOB data type accepts character input and treats it just as it would all other binary data. Hence, the BLOB data type treats all textual data as an array of bytes. Text data used in ISQL has a character set associated with it. This will most likely be the character encoding of the machine running ISQL (or any other client).

The server does not perform any character set conversion in these cases. Again, the server treats the data as an array of bytes. To convert or store the textual data to a particular encoding (other than the system encoding), cast the character data to the required character set.

Topics

Advance To: