Re: ProC and selecting into arrayed structures?

From: Rémy ROUVIN <r_rouvin_at_club-internet.fr>
Date: 1996/04/20
Message-ID: <31790AC0.3888_at_club-internet.fr>#1/1


Tom Armistead wrote:
>
> Can anyone help me with this? I've written some ProC code that
> selects into structures. (i.e. cursor and then 'fetch for :number').
> I'm having problems getting arrayed strctures to work. I've tried
> making the structure an array (i.e. struct Record rec[100]). The
> fetch works, but I get junk back from Oracle (i.e. the structure has
> bad data in it). I also tried making each field in the structure an
> array (i.e. struct Record { int f1[100]; int f2[100; } rec). The
> fetch stiff works (i.e. sqlcode returns 0 or 1403), but I stiff have
> junk in the data returned from Oracle. I'm using ProC 2.?.

When the Fetch return more record than the array size. ORCALE return 1403 error. You must declare WHENVER NOT FOUND CONTINUE and check the sqlcq.sqlerrd[2] for the number of fetched records.

Rémy rouvin. Received on Sat Apr 20 1996 - 00:00:00 CEST

Original text of this message