Re: [INTERFACES] ecpg cursors and scope - Mailing list pgsql-interfaces

From Pavel PaJaSoft Janousek
Subject Re: [INTERFACES] ecpg cursors and scope
Date
Msg-id 00bb01be8d61$ad46e040$0200a8c0@server.fonet2.cz
Whole thread Raw
Responses Re: [INTERFACES] ecpg cursors and scope
List pgsql-interfaces
>>     I think, that principly is correct contructions like this:
>
>No, to do this you need the PREPARE statement.

   Thanks, but in PostgreSQL or ECPG manual isn't this... and I forgot
syntax from Oracle...Could you put some example (the best is the contruction
below)?

if (cond)   exec sql declare cur cursor for select count (*) from tpm;
else   exec sql declare cur cursor for select count (*) from tpm where col1 =
:cislo1;
exec sql open cur;
exec sql whenever not found break;
while (1)
{   exec sql fetch in cur into :cislo2;
}
   Thanks...

-------------------------------------------------------------------------
Pavel Janousek (PaJaSoft)                         FoNet, spol. s r. o.
Vyvoj software, sprava siti, Unix, Web, Y2K     Anenska 11, 602 00  Brno
E-mail: mailto:Janousek@FoNet.Cz                Tel.: +420  5  4324 4749
SMS:    mailto:P.Janousek@SMS.Paegas.Cz         Fax.: +420  5  4324 4751
WWW:    http://WWW.FoNet.Cz/                  E-mail: mailto:Info@FoNet.Cz
--------------------------------------------------------------------------




pgsql-interfaces by date:

Previous
From: Jon Barnett
Date:
Subject: RE: [INTERFACES] JDBC next() method
Next
From: "Pavel PaJaSoft Janousek"
Date:
Subject: Re: [INTERFACES] Comment in ECPG - again