Re: Dynamic SQL - proC - Method 4
From: Ronald <devnull_at_ronr.nl>
Date: 8 Aug 2001 23:07:27 -0700
Message-ID: <67ce88e7.0108082207.5ba4010f_at_posting.google.com>
http://ronr.nl/unix-dba Received on Thu Aug 09 2001 - 08:07:27 CEST
Date: 8 Aug 2001 23:07:27 -0700
Message-ID: <67ce88e7.0108082207.5ba4010f_at_posting.google.com>
"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.
http://ronr.nl/unix-dba Received on Thu Aug 09 2001 - 08:07:27 CEST