tags:

views:

238

answers:

2

I want to call a PL/SQL stored procedure from Pro*C which takes an array parameter (table of integer). All the documentation on the Oracle site assumed you are using a static array, or at least one defined in the same procedure as the query. I want to pass an array to a C function, that can then be sent up to the database. The problem here is that I don't have the size at compile time (or rather it won't be available to the Pro*C preprocessor). Is there any way to set the length of the array being sent up to the database in code, or do I have to make a new static array and copy my data into it?

An example of the documentation is at this link

Edit - I found the answer at a non-Oracle site Oracle Docs

A: 

It looks like the FOR clause is you friend here.

Nikolai N Fetissov
Not quite - I continued randomly typing variants of my question into Google and found the answer. Thanks anyway.
Greg Reynolds
A: 

The answer is here: Oracle Docs. It's the ARRAYLEN parameter.

Greg Reynolds