| From: | Atif Jung <atifjung(at)gmail(dot)com> |
|---|---|
| To: | pgsql-novice(at)postgresql(dot)org |
| Subject: | HELP! |
| Date: | 2010-04-28 13:40:15 |
| Message-ID: | p2jd1c6b9c51004280640t682daf4eq5d36964de5d97b1c@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-novice |
Writing in C with ECPG and I have the following code:
EXEC SQL BEGIN DECLARE SECTION;
char h_sqlBuffer[256];
EXEC SQL END DECLARE SECTION;
strcpy (h_sqlBuffer, "INSERT INTO address (street, county, postcode,
country) VALUES (?,?,?,?)");
EXEC SQL PREPARE insert_temp FROM :h_sqlBuffer;
EXEC SQL EXECUTE insert_temp USING :h_street, :h_county, POSTCODE_IND,
COUNTRY_IND;
POSTCODE_IND and COUNTRY_IND are #define'd in an included header file as "Y"
(inside a BEGIN DECLARE SECTION)
When compiling I get an error which read:
ERROR: syntax error at or near """
and the line it shows is the one in red.
Atif
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Urs Rau | 2010-04-28 15:59:05 | how to continue after error in batch mode with psql |
| Previous Message | gargoyle60 | 2010-04-28 08:27:41 | Re: PostgreSQL Book |