Re: [INTERFACES] Re: ecpg - `exec sql delete' failing (fwd)
От | Tom Good |
---|---|
Тема | Re: [INTERFACES] Re: ecpg - `exec sql delete' failing (fwd) |
Дата | |
Msg-id | Pine.LNX.3.95.980406082301.13472A-100000@mailhost.nrnet.org обсуждение исходный текст |
Ответ на | Re: ecpg - `exec sql delete' failing (fwd) (Herouth Maoz <herouth@oumail.openu.ac.il>) |
Список | pgsql-interfaces |
On Mon, 6 Apr 1998, Herouth Maoz 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 ":")? Herouth - tried it just now... > Seems to me that without using colon, it may think that delet_num is a > column name. This fails as well...hmm...back to the drawing board! Let me try it as a separate function. ----------- Sisters of Charity Medical Center ---------- Department of Psychiatry ---- Thomas Good, System Administrator <tomg@q8.nrnet.org> North Richmond CMHC/Residential Services Phone: 718-354-5528 75 Vanderbilt Ave, Quarters 8 Fax: 718-354-5056 Staten Island, NY 10305
В списке pgsql-interfaces по дате отправления: