Subject Re: [IBO] ib_query ignores my data!
Author staff@belding
----- Original Message -----
From: Geoff Worboys <geoff@...>
To: <IBObjects@yahoogroups.com>
Sent: Thursday, March 22, 2001 8:09 PM
Subject: Re: [IBO] ib_query ignores my data!


> > Is this just a matter of coming to a
> > concensus on use of VARCHAR and CHAR ?
>
> I agree. Despite the manipulations that IB may do with these fields
> on the server, I thought the intention was always that CHAR fields
> were supposed to be fixed length, while VARCHAR was varying. So if
> practical I would prefer to see...
>
> VARCHAR default to right trimming.
> CHAR default to no trimming.
>
> Either field should be able to be changed via the FieldsTrimming
> property.

We are probably at the point of personal preferences now.

It is a generally accepted design principle that you should not change a
users data without warning, unless you apriori know what the form the data
should be. Having a default condition to change data to my mind is I suggest
counter intuitive. I appreciate the network bandwidth issue but if that is
an issue and trimming will do no harm let the developer declare this by
setting a "trim option".

Example: Suppose an unusual encryption scheme allows right spaces in a CHAR
field. A default position of trimming ruins it.

Changing data without an announcement as a default setting is not smart. In
this case the component designer is assuming too much. The component user
should, I suggest, make the trim or not trim call. CHAR or VARCHAR is a
convenient dividing line but distracts from the basic issue of who owns the
data.

However, a developer can use the component no matter what the default
setings are.

rb