skip to main content
Drivers for 32-Bit and 64-Bit Platforms : The MySQL Wire Protocol Driver : Connection Options Descriptions : Treat Binary Data as Character Data
 

Try DataDirect Drivers Now
Treat Binary Data as Character Data

Attribute

TreatBinaryAsChar (TBAC)

Purpose

Allows data that MySQL stores as BINARY or VARBINARY to be described and returned as CHAR or VARCHAR values, respectively.

Valid Values

0 | 1

Behavior

If set to 1 (Enabled), the driver describes and returns data that MySQL stores as BINARY or VARBINARY as CHAR or VARCHAR values, respectively.
If set to 0 (Disabled), the driver describes and returns data that MySQL describes as BINARY or VARBINARY as BINARY or VARBINARY values, respectively.

Example

Create the following MySQL table:
CREATE TABLE binTable (col1 binary(3))
Then, execute the following Insert statement:
INSERT INTO binTable values('abc')
Then, execute the following query:
SELECT col1 FROM binTable
Using this example, the driver would return the value of col1 as a CHAR value, "abc", instead of a BINARY value "616263".

Default

0 (Disabled)

GUI tab

Advanced tab