By default,
the SAS providers trim trailing blanks from character columns. This
behavior differs from the default SAS DATA step behavior in which
trailing blanks are preserved. To force the SAS providers to preserve
trailing blanks, set the "SAS Preserve Trailing Blanks" property to
True
. The following sample Visual Basic code shows
how this task is done.
' obConnection is an open Connection object.
Dim obRecordset As New ADODB.Recordset
obRecordset.ActiveConnection = obConnection
obRecordset.Properties("SAS Preserve Trailing Blanks") = True
' The second parameter on the Open method must remain empty.
obRecordset.Open "sashelp.shoes", , adOpenStatic, adLockReadOnly, adCmdTableDirect