Subject Re: [IBO] ib_query ignores my data!
Author Helen Borrie
At 01:07 PM 22-03-01 +1200, you wrote:

> > Here's what I would like to do here. I want to make it so that by default
> > there is no trimming of spaces when the SQLLen of the text column is only
>1.
>
>I suggest this is not a good idea, having the behaviour of the field
>dependent on the length of the field.
>Length 1 is not "special". The argument for treating length 1 special could
>also be made for length 2, ......

Only in the situation where the stored string was nothing but a series of blank spaces.

>I also suggest the default behaviour should be no trimming, not right
>trimming.
>Users should be allowed to retain right spaces.

Please, no! The server sends all chars and varchars across right-padded with blanks to the maximum (defined) size. There is NO WAY the buffers should be clogged up with these non-meaningful characters.

To me, it makes no sense to store a string of blanks as the sole content of a char or varchar column. They are meaningless. Store ascii 0 (empty string) in non-nullable columns; otherwise store null.

Default to right trim with the NOTRIM option available for the exceptional cases, e.g. where people deliberately store strings of blanks for use as padding in reports (ERK!! IT HAPPENS!!).

Cheers,
Helen

All for Open and Open for All
InterBase Developer Initiative ยท http://www.interbase2000.org
_______________________________________________________