ecpg fetch

From: David Chays <dchays(at)photon(dot)poly(dot)edu>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: ecpg fetch
Date: 1999-08-11 18:26:21
Message-ID: Pine.SUN.3.91.990811141312.15861B-100000@photon.poly.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

We followed the syntax for cursors from a standard SQL book
but are getting a compilation error on the line
exec sql fetch in repcurs into :choices;

Thanks for your help,
-David, Dan

exec sql include sqlca;
..
exec sql begin declare section;
int choices;
exec sql end declare section;
..
exec sql declare repcurs cursor for
select number from singer;
..
exec sql open repcurs;

exec sql whenever not found goto done;

for (;;)
{
exec sql fetch in repcurs into :choices;
printf("Number %d \n", choices);
}

done: exec sql close repcurs;

Browse pgsql-interfaces by date

  From Date Subject
Next Message Hiroki Kataoka 1999-08-11 19:33:38 RE: PgAccess 0.97 - final preview
Previous Message Constantin Teodorescu 1999-08-11 15:01:21 Re: [INTERFACES] libpgtcl and array fields return format - PROPOSAL