Re: ecpg - `exec sql delete' failing (fwd)

From: Herouth Maoz <herouth(at)oumail(dot)openu(dot)ac(dot)il>
To: Thomas Good <tomg(at)q8(dot)nrnet(dot)org>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: ecpg - `exec sql delete' failing (fwd)
Date: 1998-04-06 12:45:44
Message-ID: l03110700b14e7e560855@[147.233.159.109]
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

At 3:28 +0100 on 6/4/98, Thomas Good wrote:

>
> scanf("%s", &reply);
> if(reply == 'y') {
> printf("\t\tEnter Client ID Number: ");
> scanf("%d", &delete_num);
> EXEC SQL DELETE FROM central WHERE client_id = delete_num;
> }
> else printf("Exiting...record not removed.\n");
> exit(0);
> }

I've already told you about scanning into a char with %s - and you haven't
fixed it. Anyway, I have another suspicion - shouldn't the delete above be
"DELETE FROM central WHERE client_id = :delete_num" (with ":")?

Seems to me that without using colon, it may think that delet_num is a
column name.

Herouth

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Tom Good 1998-04-06 18:58:22 Re: [INTERFACES] Re: ecpg - `exec sql delete' failing (fwd)
Previous Message Tom Good 1998-04-06 12:24:13 Re: [INTERFACES] Re: ecpg - `exec sql delete' failing (fwd)