Received: from smtp1.libero.it (smtp1.libero.it [193.70.192.51]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id eA9DlJs42688; Thu, 9 Nov 2000 08:47:20 -0500 (EST) (envelope-from maurizio.c@libero.it) Received: from maurizio (151.29.213.147) by smtp1.libero.it; 9 Nov 2000 14:46:39 +0100 Message-ID: <004301c04a53$f98ecc00$7394fea9@maurizio> From: "Maurizio" To: "Michael Meskes" Cc: References: <001101c048db$38a74d60$7394fea9@maurizio> <20001108123942.A7369@feivel.fam-meskes.de> Subject: Re: [INTERFACES] USE OF CURSORS IN ECPG Date: Thu, 9 Nov 2000 14:49:29 +0100 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 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-Archive-Number: 200011/366 X-Sequence-Number: 447 But, how can I do ? I have to recall the same routine many times. I tried to prepare and declare the cursor inside the routine but when I compile with ecpg I receive the error Cursor already defined. Maurizio . ----- Original Message ----- From: "Michael Meskes" To: "Maurizio" Cc: Sent: Wednesday, November 08, 2000 12:39 PM Subject: Re: [INTERFACES] USE OF CURSORS IN ECPG > 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!