Received: from shaked.cc.openu.ac.il (shaked.cc.openu.ac.il [147.233.145.65]) by hub.org (8.8.8/8.7.5) with ESMTP id GAA12720 for ; Mon, 6 Apr 1998 06:45:08 -0400 (EDT) Received: from [147.233.159.109] (mac-herouth.pc.openu.ac.il [147.233.159.109]) by shaked.cc.openu.ac.il (8.8.5/8.8.5) with ESMTP id NAA26200; Mon, 6 Apr 1998 13:44:37 +0300 (IDT) X-Sender: herouth@shaked.cc.openu.ac.il Message-Id: In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Date: Mon, 6 Apr 1998 13:45:44 +0100 To: Thomas Good From: Herouth Maoz Subject: Re: ecpg - `exec sql delete' failing (fwd) Cc: pgsql-interfaces@postgresql.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