If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Delphi, C etc > Embedded SQL with Visual C++

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-10-04, 18:08
mmkazemi mmkazemi is offline
Registered User
 
Join Date: Jan 2004
Location: canada
Posts: 3
Embedded SQL with Visual C++

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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On