Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: fetch in array from ProC
Do you need to fetch all the records at once. I would think you can do
batch fetches. In your example
fetch the 1st 20, then next 20, then next 8.
for ex.
int my_array[10];
EXEC SQL DECLARE cursor1 CURSOR FOR...;
EXEC SQL OPEN cursor1;
EXEC SQL WHENEVER NOT FOUND GOTO no_more;
for (;;)
{
EXEC SQL FETCH cursor1
INTO :my_array;
/* Do processing */
}
Rick
> -----Original Message-----
> From: Sackwitz, Antje [SMTP:Sackwitz_at_vst.vossloh.de]
> Sent: Monday, May 22, 2000 11:26 AM
> To: Multiple recipients of list ORACLE-L
> Subject: fetch in array from ProC
>
> Hi,
> I want to do the fetch of data against the Oracle 8.0.5 database by ProC
> using arrays.
> Til now I was not able to give the size of the array dynamically and if
> I say arraysize is 10, and I retrieve 28 records,
> the last 8 records will not be fetched as Oracle cannot fill up the
> entire array.
> any help is greatly appreciated.
>
> Regards,
> Antje
>
> -----------------------------------------------------------------
> Antje Sackwitz Phone: +49-431-7109-514
> Vossloh System-Technik GmbH Fax: +49-431-7109-675
> Edisonstr. 3 E-Mail: sackwitz_at_vst.vossloh.de
> 24145 Kiel
> -----------------------------------------------------------------
>
>
> --
> Author: Sackwitz, Antje
> INET: Sackwitz_at_vst.vossloh.de
>
> Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> San Diego, California -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).
Received on Mon May 22 2000 - 11:43:23 CDT
![]() |
![]() |