When using EXEC SQL PREPARE, is it necessary to save the SQL in a buffer
first or can you write:
EXEC SQL PREPARE statement FROM "SELECT name FROM address WHERE code = ?";
or must it be
EXEC SQL BEGIN DECLARE STATEMENT;
char h_sqlBuffer[256];
EXEC SQL END DECLARE STATEMENT;
strcpy(h_sqlBuffer,"SELECT name FROM address WHERE code = ?";
EXEC SQL PREPARE statement FROM :h_sqlBuffer;
Thanks
Atif