Received: from www.flamingo.cz (root@fwd.cz [194.212.23.91]) by hub.org (8.9.3/8.9.1) with ESMTP id XAA04179; Fri, 23 Apr 1999 23:00:14 -0400 (EDT) (envelope-from janousek@fonet.cz) Received: from router.fonet2.cz (ts3-1.bm.cesnet.cz [194.212.133.32]) by www.flamingo.cz (8.8.8/8.8.8) with ESMTP id FAA01459; Sat, 24 Apr 1999 05:00:04 +0200 Received: from server (server.fonet2.cz [192.168.0.2]) by router.fonet2.cz (8.9.1/8.9.1) with SMTP id KAA04949; Fri, 23 Apr 1999 10:24:35 GMT Message-ID: <00bb01be8d61$ad46e040$0200a8c0@server.fonet2.cz> From: "Pavel PaJaSoft Janousek" To: "Michael Meskes" Cc: "PgSQL Interfaces" Subject: Re: [INTERFACES] ecpg cursors and scope Date: Fri, 23 Apr 1999 10:17:03 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 4.72.3110.5 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 >> 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 --------------------------------------------------------------------------