ODBC and space padding

Skip to first unread message

Wendell Rios

Dec 2, 1999, 3:00:00 AM12/2/99
Hi all!

Using the native driver for Sybase System 10 to acess a fixed character
field char(12) the query returned just the field content: 8 characters.
Accessing the same field using an ODBC Driver the same query returned the
field content plus 3 spaces padding, resulting in 12 characters

There are some difference on spaces padding when using native or ODBC

There are any workaround?

Linda Klem

Dec 2, 1999, 3:00:00 AM12/2/99

The spaces that pad the field are deliberately removed so that for example
in a datawindow the user doesn't have to delete the spaces before he/she can
type into the field. You can change the behavior when using ODBC by
modifying your pb odb ini file. You add the following to the paragraph for
your Sybase ODBC driver: PBTrimCharColumns='YES'. BTW search your ini file
for the string I pasted in below. This will take you to the section of this
file that shows all of the overrides for ODBC and what the default behavior
is. The file is self-documenting in this regard.

PBTrimCharColumns='YES' - trim trailing blanks after fetching character
; data, default is NO

Linda Klem
PowerBuilder Product Support

Wendell Rios <wende...@i.am> wrote in message

Reply all
Reply to author
0 new messages