Re: Dynamic SQL - proC - Method 4
Date: Tue, 24 Jul 2001 10:15:36 -0700
Message-ID: <k3i77.31$hI3.28305_at_news.pacbell.net>
"Erwin Dondorp" <erwindon_at_wxs.nl> wrote in message
news:3B5D2932.615C0D6C_at_wxs.nl...
> Sylvain Benoist wrote:
> > When we want to get some data from the database by using this
application,
> > everything works fine except with the "string" fields. Indeed, if the
type
> > of one field is varchar(10) and this field contains 4 characters, the
> > Dynamic SQL method 4 will return a string containing 10 characters with
the
> > 4 corresponding characters + 6 spaces.
>
> You need to set s->T[i] to 5 ("C"-string) of the varchar2 columns.
> You probably used 1 ("char") or 9 ("varchar").
>
> Erwin
>
/* Coerce select-list value to STRING */
But the length returned is still the maximum length of the varchar field.
bind_des->T[i] = 5;
Sylvain. Received on Tue Jul 24 2001 - 19:15:36 CEST