Also,
My insert statement is
EXEC SQL INSERT INTO raw_email (id,raw_email) VALUES (1,:ch);
On 8/16/06, Michael Fuhr <[EMAIL PROTECTED]> wrote:
On Wed, Aug 16, 2006 at 01:20:08AM -0400, Jasbinder Bali wrote:> This is how the array is formed in my C code
> --
I changed the datatype from varchar[] to varchar
ECPGdebug(1,stderr) says
[2998]: ECPGexecute line 97 Ok: INSERT 0 1
Its not inserting any record even though sqlcode is 0.
~Jas
On 8/16/06, Michael Fuhr <[EMAIL PROTECTED]> wrote:
On Wed, Aug 16, 2006 at 01:20:08AM -0400, Jasbinder Bali wrote:>
On Wed, Aug 16, 2006 at 01:20:08AM -0400, Jasbinder Bali wrote:
> This is how the array is formed in my C code
> ---
> FILE *fp;
>
> while(!feof(fp))
> {ch[i]=fgetc(fp);
> if(ch[i]=='\n') lines++;
This is how the array is formed in my C code
---
FILE *fp;
while(!feof(fp)) {ch[i]=fgetc(fp); if(ch[i]=='\n') lines++; i++; } ch[i-1]='\0'; fclose(fp);---
On Wed, Aug 16, 2006 at 12:38:42AM -0400, Jasbinder Bali wrote:
> table definition of raw_email table is as follows
>
> CREATE TABLE raw_email (
> idint4 NOT NULL,
> raw_email varchar[],
> parsed_flag bool NOT NULL DEFAULT false,
> CONSTRAINT pk_rawemail PRIMARY KEY (id)
table definition of raw_email table is as follows
CREATE TABLE raw_email ( idint4 NOT NULL, raw_email varchar[],
parsed_flag bool NOT NULL DEFAULT false,
CONSTRAINT pk_rawemail PRIMARY KEY (id))
WITHOUT OIDS;
i have very much declared raw_email field as varchar and n
On Tue, Aug 15, 2006 at 11:55:58PM -0400, Jasbinder Bali wrote:
> I'm using ECPG and trying to do follwoing insert in one of the talbes.
>
> insert into raw_email ( id , raw_email ) values ( 1 , :ch);
>
> ch is an array and defined as follows:
>
> EXEC SQL BEGIN DECLARE SECTION;
>char ch[M