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!