Re: Pro*C host arrays: how big?

From: Judy Ko -- Consultant <judy_at_gftpd-mail.citicorp.com>
Date: 2 Feb 1994 19:59:28 GMT
Message-ID: <2ip0n0$dl4_at_charon.citicorp.com>


Simon Stearn BT group (sjs_at_metagen.co.uk) wrote:
> In article <CJxpy3.7Cu_at_uk.ac.brookes>, p0070621_at_oxford-brookes.ac.uk (Tommy Wareing) writes:
> |> Software: Oracle 6.0.36, PRO*C 1.4.11.
> |>
> |> Anyone know how to transfer data from the database into a PRO*C
> |> host array, when the size of the array is not known at compile
> |> time?
> |>

> What you do is declare an integer (or long) and use that in the FOR part of the
> embedded select, like so:
 

> EXEC SQL FOR :max_no_of_rows
> SELECT stuff
> INTO :host_array
> FROM table
> WHERE appropriate = 'Y';

According to the PCC documentation for V1.5, you cannot use "FOR" in a select statement. The syntax is ambigious to Oracle. Oracle doesn't support result either. You cannot malloc dynamically to store all return records at once. Just have to do it by chucks.

On the note of structure, I think I heard they are going to support user-defined type (like structure) in PCC v 2.0. Let's see.

Cheers,
Judy. Received on Wed Feb 02 1994 - 20:59:28 CET

Original text of this message