> while(1)
> {
> EXEC SQL FETCH IN c_movie INTO :movie_title;
> printf("%s\n",movie_title);
> movie_title = NULL;
> }
>
> free (movie_title);
As a side note, you should free movie_title each time, not just set it
to NULL if you use auto allocation.
> At while loop, it keeps on looping forever and my table has 2 records for
> the query that is eventually build.
> Does that mean EXEC SQL WHENEVER NOT FOUND DO BREAK; is not
> working.
No, that would be the first time I hear about this. You could run your
program with debugging enabled (see test/*.pgc for example). Also I'd
like to know which version of ecpg you're using.
Michael
--
Michael Meskes
Email: Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
ICQ: 179140304, AIM/Yahoo: michaelmeskes, Jabber: meskes@jabber.org
Go SF 49ers! Go Rhein Fire! Use Debian GNU/Linux! Use PostgreSQL!