Preserve trailing whitespace Sybase

Posted by AngryWhenHungry on Stack Overflow See other posts from Stack Overflow or by AngryWhenHungry
Published on 2010-05-31T11:46:13Z Indexed on 2010/05/31 11:53 UTC
Read the original article Hit count: 151

Filed under:
|

I have a big chunk of textual data which I split and write multiple rows of a varchar(255) column of a table. Sometimes, the last character happens to be a space. When I read back this row, the trailing space is chopped and I get only 254 characters. This messes up my data when I append the next row to the end of this one.

  1. My code sends the full 255 char (incl space) to the DB API. How can I check that the trailing space is actually written to the table?

  2. I am not in a position to rewrite/redesign legacy code. Is there any setting - either in the DB, DB interface, read/write calls etc - that I can use to preserve the trailing space?

© Stack Overflow or respective owner

Related posts about sybase

Related posts about whitespace