Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM General » View Thread |
Messages 1 to 3 of 3 total |
Trailing space |
Wed, Apr 15 2009 9:14 PM | Permanent Link |
yury | Hi,
is there a workaround to prevet removing trailing spaces for char data type? Thank you, Yury |
Thu, Apr 16 2009 12:26 AM | Permanent Link |
"Jerry Clancy" | Just pad right the result to the length of the field.
Some functions you might find useful: function pad(sStr:string; nSize: integer): string; var i: integer; begin for i := 1 to nSize - length(sStr) do sStr := sStr + ' '; pad := sStr; end; function padl(S:string; nLen: integer): string; begin while length(s) < nLen do S := ' ' + S; padl := S; end; function padl0(S:string; nLen: integer): string; begin while length(s) < nLen do S := '0' + S; padl0 := S; end; function padr(sStr:string; nSize: integer): string; begin Result := pad(sStr, nSize); end; Jerry "yury" <yury@favour.com.au> wrote in message news:4F52B06F-9999-4115-B9DB-7FE987BC79C9@news.elevatesoft.com... > Hi, > is there a workaround to prevet removing trailing spaces for char data > type? > > Thank you, > Yury > |
Fri, Apr 17 2009 11:39 AM | Permanent Link |
Fernando Dias Team Elevate | Yury,
DBISAM does not automatically remove trailing spaces from CHAR (FixedChar) fields - blank spaces are only automatically trimmed from VARCHAR (String) fields. So, the workaround is to use the CHAR type instead of VARCHAR. -- Fernando Dias [Team Elevate] |
This web page was last updated on Friday, April 19, 2024 at 07:09 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |