Re: ecpg weird behavior - Mailing list pgsql-interfaces

From Michael Meskes
Subject Re: ecpg weird behavior
Date
Msg-id 20020320201957.GE14143@feivel.fam-meskes.de
Whole thread Raw
In response to Re: ecpg weird behavior  ("Nicolas Bazin" <nbazin@ingenico.com.au>)
List pgsql-interfaces
On Wed, Mar 20, 2002 at 11:15:14AM +1100, Nicolas Bazin wrote:
> EXEC SQL PREPARE statement FROM :requete;
> EXEC SQL DECLARE curs_cartlstnoire CURSOR FOR statement;
> didn't get preprocessed.

From my current test sources (which will be committed in a few minutes):

sprintf (command, "select * from \"Test\"");

exec sql prepare F from :command;
exec sql declare CUR cursor for F;

strcpy(msg, "open");
exec sql open CUR;

strcpy(msg, "fetch");
exec sql fetch :how_many in CUR into :name, :amount, :letter;
...

Works like a charm with 7.2. I have no idea why yours didn't get preprocessed.

Michael
-- 
Michael Meskes
Michael@Fam-Meskes.De
Go SF 49ers! Go Rhein Fire!
Use Debian GNU/Linux! Use PostgreSQL!


pgsql-interfaces by date:

Previous
From: Andreas Kretzer
Date:
Subject: Re: Problem with pgaccess
Next
From: Michael Meskes
Date:
Subject: Re: ecpg weird behavior