Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Dynamic SQL - proC - Method 4
"Sylvain Benoist" <sylvainb_at_whitepj.com> wrote in message news:<qtic7.121$6Y3.103735_at_news.pacbell.net>...
> Hello everybody,
> Some people responded to me and told me to reset datatype codes in the T
> descriptor array, i.e coercing datatypes. It is what I did to coerce , for
> instance , the ith select list value to STRING by using the following
> statement :
> select_des->T[i] = 5;
Sylvain
select_des->T[i] = 9; /* varchar2 */
select_des->L[i] += 2;
In this case you receive a struct containing length and the data. You also need to set L in order to be able to hold the extra length bytes.
After fetching:
varchar * p;
p=(varchar *)select_des->V[i];
fprintf (f,".*s\n", p->len, p->arr);
Ronald.