Re: Pro*C - host arrays of structure?
Date: 2000/06/07
Message-ID: <393E34A8.C3B41F6D_at_unilog.fr>#1/1
Obakesan a écrit :
>
> HiYa
Hi !
>
> I know that I can use an structure in a host variable, for example
>
> EXEC SQL FETCH details_cur INTO
> :ftchdOrd.recipient_id:inds[22],
> :ftchdOrd.account_code:inds[1],
> :ftchdOrd.enquiry_num:inds[2],
>
> where the struct ftchdOrd is declared in the SQL DECLARE area.
[Quoted] Yes ! But this would be probably a properly syntax : struct { recipient_id char[22];
account_code char[1]; enquiry_num char[2]; } ftchdOrd;
...
EXEC SQL FETCH details_cur INTO :ftchdOrd;
>
> also I know that I can use an host array declared in the SQL
> DECLARE area like:
>
> char order_seq_num[y][x];
> char citec_order_number[y][x];
>
> and fetch into it in lumps ....
Yes again !
>
> but when I try to make an array of struct it seems to refuse to swallow
> it. So my question is, can I use an array of struct and fetch into that?
> or indeed insert in batch with that??
>
NO ! You can't use an array of struct, but only a struct of arrays ! (You can further use an element of an array of struct)
> thanks
>
> --
>
> See Ya
Bye
Remark : I'm using Oracle 7.3.4, may be it's possible with more recent versions.
-- Pierre CHARPENAYReceived on Wed Jun 07 2000 - 00:00:00 CEST