Subject | Re: [IBO] Still having problems with OnCalculateField |
---|---|
Author | Helen Borrie |
Post date | 2004-01-15T09:44:24Z |
At 09:26 AM 15/01/2004 +0000, you wrote:
varchar are different data types and the SQL type information returned on
each is specific. IBO knows not to autotrim chars.
FIRST_NAME and LAST_NAME, though?
If you want to set this globally, do it in the FieldsTrimming property of
the ib_connection:
EMPLOYEE.FIRST_NAME=R
EMPLOYEE.LAST_NAME=R
ANOTHERTABLE.SOME_COLUMN=B
...
and so on.
Helen
>--- In IBObjects@yahoogroups.com, Helen Borrie <helebor@t...> wrote:It does and always did - unless you trimmed them yourself. Char and
>
> > Are you sure these columns are varchar and not char? If you are
>using IB
> > 7.1, there is nothing to trim on varchars, so I'm suspicious. :-)
> >
> > If this *is* the problem, then use the FieldsTrimming attribute to
> > eliminate padding in whatever way you desire. This applies
>trimming at the
> > field level, either in the dataset, or globally if you want, in the
> > connection component.
> >
> > >I have also ensured that the connection's DefaultNoTrimming
>property
> > >is FALSE.
> >
> > This doesn't trim char types, afaik.
> >
>
>Helen,
>thanks for this. The fields ARE Char fields - a CHAR (15) and a CHAR
>(30). I assume that what you're saying therefore is that IB Objects
>now returns Char fields untrimmed?
varchar are different data types and the SQL type information returned on
each is specific. IBO knows not to autotrim chars.
>The thing that confuses me aboutAsString reads a variant. Delphi doesn't have fixed length character types.
>this is that if you use AsString anywhere outside of the
>OnCalculateField event it trims the field fine.
>If we do have to useIf FULLNAME is a database column, yes. Weren't we talking here about
>FieldsTrimming I assume we simply use:
>FULLNAME=r
>to right trim?
FIRST_NAME and LAST_NAME, though?
If you want to set this globally, do it in the FieldsTrimming property of
the ib_connection:
EMPLOYEE.FIRST_NAME=R
EMPLOYEE.LAST_NAME=R
ANOTHERTABLE.SOME_COLUMN=B
...
and so on.
Helen