Hello all;

I have many problems compiling very easy embedded SQL codes in Visual c++ Could anyone out there help me with this?

I have the following code:

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sqlenv.h>
#include <sqlcodes.h>
#include <string.h>
#include <sql.h>
#include <sqlda.h>
#include <sqlutil.h>
#include <time.h>

#define EXIT 0
#define NOEXIT 1

EXEC SQL INCLUDE SQLCA;

EXEC SQL BEGIN DECLARE SECTION ;
short sage;
short sid;
char sname[16];
EXEC SQL END DECLARE SECTION ;

char msg[1025];
int rc;
int errcount;
....
....


and compile result is:


Compiling...
test2.c
D:\SQL_C\myproject\test2.c(41) : error C2282: 'EXEC' is followed by 'SQL' (missing ','?)
D:\SQL_C\myproject\test2.c(48) : error C2282: 'EXEC' is followed by 'SQL' (missing ','?)
D:\SQL_C\myproject\test2.c(52) : error C2282: 'EXEC' is followed by 'SQL' (missing ','?)
....
....


Thank you in advance for your help