Re: [GENERAL] ECPG usage

2006-07-25 Thread Michael Meskes
>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 us

[GENERAL] ECPG (usage of simple select statement)

2006-07-20 Thread Jasbinder Bali
Hi,   I'm using ECPG in my C code and I want to display the result of a simple select statement.   If i write something like EXEC SQL select * from abc ; (which as of now is not working)   wouldn't this display the result staright away or its always mandatory to use a cursor and then do printf() f

[GENERAL] ECPG usage

2006-07-20 Thread Jasbinder Bali
Hi,I have the follwing ECPG code.-#include EXEC SQL INCLUDE sqlca;int main (){    EXEC SQL BEGIN DECLARE SECTION;     char movie_type[20];    char *movie_title=NULL;    char query_string[

Re: [GENERAL] ECPG usage

2006-07-06 Thread Reid Thompson
Jasbinder Bali wrote: Hi Can anyone help me with the usage of ECPG?? Like how to go about it, what all header files to include in my C file and other things that i need to give due considerations before using ECPG ~Jas see /src/interfaces/ecpg ( test has several examples ) --

Re: [GENERAL] ECPG usage

2006-07-05 Thread Richard Broersma Jr
> Hi > Can anyone help me with the usage of ECPG?? > Like how to go about it, what all header files to include in my C file > and other things that i need to give due considerations before using ECPG Sorry, I don't really know. I've never used it. But I can try to take a guess from 2 minutes I s

[GENERAL] ECPG usage

2006-07-05 Thread Jasbinder Bali
HiCan anyone help me with the usage of ECPG??Like how to go about it, what all header files to include in my C file and other things that i need to give due considerations before using ECPG~Jas