pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Herouth Maoz <herouth@oumail.openu.ac.il>
To: Thomas Good <tomg@q8.nrnet.org>
Cc: pgsql-interfaces@postgresql.org
Subject: Re: ecpg - `exec sql delete' failing (fwd)
Date: Mon, 6 Apr 1998 13:45:44 +0100
Message-ID: <l03110700b14e7e560855@[147.233.159.109]> (raw)
In-Reply-To: <Pine.SV4.3.91.980405222714.29755A-100000@q8.nrnet.org>

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





view thread (4+ messages)  latest in thread

Message-ID: <l03110700b14e7e560855@[147.233.159.109]>
Permalink:  ../l03110700b14e7e560855@%5B147.233.159.109%5D/
Also on:    postgresql.org/message-id/l03110700b14e7e560855@[147.233.159.109]

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-interfaces@postgresql.org
  Cc: herouth@oumail.openu.ac.il, tomg@q8.nrnet.org
  Subject: Re: ecpg - `exec sql delete' failing (fwd)
  In-Reply-To: <l03110700b14e7e560855@[147.233.159.109]>
  References: <Pine.SV4.3.91.980405222714.29755A-100000@q8.nrnet.org> <l03110700b14e7e560855@[147.233.159.109]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox