DF_DATABASE_TRUNCATE_BINARY_ZEROES
Enables or disables truncating of trailing zeroes.
Level
Database
Supported by
The DataFlex SQL Drivers (SQL Server, DB2, and ODBC), revision 5 and higher.
Type
Boolean, temporary
Access
Read/Write
Values
- True
- False
Syntax
Use cli.pkg
Get_Attribute DF_DATABASE_TRUNCATE_BINARY_ZEROES of {driverNumber} {databaseHandle} to {BooleanVariable}
Set_Attribute DF_DATABASE_TRUNCATE_BINARY_ZEROES of {driverNumber} {databaseHandle} to {True|False}
Driver Configuration Keyword
Remarks
Some back-ends will return binary data completely filled out with binary zeroes. For example, if you store the hex value AE003400 in a column of 6 positions, you would see AE0034000000 when retrieving the column.
It is possible to switch on truncation of trailing binary zeroes. However, this will also truncate trailing zeroes that are actually part of the column value. Storing the hex value AE003400 in a column of 6 positions would give AE0034 when retrieving the column.
You can turn on truncating of trailing zeroes by setting this attribute to true.
Example
Procedure ShowDBAttribute Integer iDriver Handle hDatabase
Boolean bAttribValue
Get_Attribute DF_DATABASE_TRUNCATE_BINARY_ZEROES of iDriver hDatabase to bAttribValue
Showln "Truncate trailing zeroes: " (If(bAttribValue, "YES", "NO"))
End_Procedure
The sample code above shows the current setting for a given database. The database handle can be obtained via the DF_DATABASE_ID attribute.