Enables or disables truncating of trailing zeroes.
Database
The DataFlex SQL Drivers (SQL Server, DB2 and ODBC), revision 5 and higher
Boolean, temporary
Read/Write
True, False
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}
Some back-ends will return binary data completely filled out with binary zeroes. If you store 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. This will however 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.
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.