Received: from feivel (geik-3e367139.pool.mediaWays.net [62.54.113.57]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id eA8CINs82135 for ; Wed, 8 Nov 2000 07:18:24 -0500 (EST) (envelope-from michael@fam-meskes.de) Received: by feivel (Postfix, from userid 1000) id 7D1FCA6039; Wed, 8 Nov 2000 12:39:42 +0100 (CET) Date: Wed, 8 Nov 2000 12:39:42 +0100 From: Michael Meskes To: Maurizio Cc: pgsql-interfaces@postgresql.org Subject: Re: USE OF CURSORS IN ECPG Message-ID: <20001108123942.A7369@feivel.fam-meskes.de> Mail-Followup-To: Maurizio , pgsql-interfaces@postgresql.org References: <001101c048db$38a74d60$7394fea9@maurizio> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <001101c048db$38a74d60$7394fea9@maurizio>; from maurizio@dreamtech-it.com on Tue, Nov 07, 2000 at 05:52:00PM +0100 X-Archive-Number: 200011/99 X-Sequence-Number: 135 On Tue, Nov 07, 2000 at 05:52:00PM +0100, Maurizio wrote: > I'm just starded using ecpg and I have some problem with cursors. > ... > exec sql prepare stmtunimpianto from :query; > . > . > exec sql commit; > ... > If I rem the commit all works fine but if I execute the commit the cursor was deleted and I receive some errors. > > At open cursor : sqlca.sqlcode = -230 Invalid statement namei in line ...... > at fetch : NOTICE : PerformPortalFetch: portal "cur_unimpianto" not found No surprise here as ending a transaction forces a deallocation of all prepared statements. AFAIK that's what the standard says. Michael -- Michael Meskes Michael@Fam-Meskes.De Go SF 49ers! Go Rhein Fire! Use Debian GNU/Linux! Use PostgreSQL!