KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Trailing Spaces
PRODUCT: ODBC for 4D Server | VERSION: 13.4 | PLATFORM: Mac & Win
Published On: April 21, 2014

When pushing data from 4D into SQL Server via odbc, the stored data may have been stored with trailing spaces in SQL Server. This may happen if the ANSI_PADDING property in SQL Server was set to on.

To disable the padding, turn off the ANSI_PADDING option on during the creation of the table. Below is an example of turning ANSI_PADDING off:

SET ANSI_SETTING OFF
Create Table Table_1(
  Column1 varchar(50),
  Column2 varchar(50)
)


For more information about the padding, refer to the following article here: https://wiseman-wiseguy.blogspot.fr/2008/05/ansipadding-and-variable-length.html