Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Pro*C host arrays

Re: Pro*C host arrays

From: Ed Prochak <edprochak_at_adelphia.net>
Date: Mon, 24 Mar 2003 20:00:49 GMT
Message-ID: <3E7F67C4.1090707@adelphia.net>


Brian Beld wrote:
>
> Ed Prochak a écrit:
>

>> Did you read earlier chapters about declaring data types? Do you know 
>> how to insert a date value that is not part of a host array? (IOW try 
>> to walk before trying to run).

>
>
> I already insert dates.
> I have dozens of columns that I insert by host arrays.
> I just want to re-organize them in a structure to simplify the VALUES
> clause by just setting the structure name instead of all the arrays.
>

Then have you tried doing this with a structure without using host arrays? (check DECLARE). Actually, if you are hoping to just be able to say someting like

EXEC SQL
INSERT into ABC_table VALUES ( &my_data_struct );

I think it does not work. Oracle doesn't know or care about the structures you use. You still have to list each column value for the INSERT. Make an array for each one of DATES just like you do for other values. I don't think you can get away for the long list. Sorry.

Just to understand this, take a look at the OCI calls generated by the Pro*C precompiler. It's ugly but interesting and informative.

HTH

-- 
Ed Prochak
running: http://www.faqs.org/faqs/running-faq/
family:  http://web.magicinterface.com/~collins
--
"Two roads diverged in a wood and I
I took the one less travelled by
and that has made all the difference."
robert frost
Received on Mon Mar 24 2003 - 14:00:49 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US