Re: [INTERFACES] ecpg cursors and scope

From: "Pavel PaJaSoft Janousek" <janousek(at)fonet(dot)cz>
To: "Michael Meskes" <meskes(at)postgresql(dot)org>
Cc: "PgSQL Interfaces" <pgsql-interfaces(at)postgresql(dot)org>
Subject: Re: [INTERFACES] ecpg cursors and scope
Date: 1999-04-23 08:17:03
Message-ID: 00bb01be8d61$ad46e040$0200a8c0@server.fonet2.cz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)FoNet(dot)Cz Tel.: +420 5 4324 4749
SMS: mailto:P(dot)Janousek(at)SMS(dot)Paegas(dot)Cz Fax.: +420 5 4324 4751
WWW: http://WWW.FoNet.Cz/ E-mail: mailto:Info(at)FoNet(dot)Cz
--------------------------------------------------------------------------

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Chairudin Sentosa 1999-04-23 09:13:12 Re: [INTERFACES] where did that date and time come from??
Previous Message Pavel PaJaSoft Janousek 1999-04-23 07:53:51 Re: [INTERFACES] Comment in ECPG - again