Compile problem with pro*c in MS VC++ 6.0 [message #93620] |
Mon, 12 August 2002 08:20 |
sn008
Messages: 7 Registered: July 2002
|
Junior Member |
|
|
Hello All,
I'm having problem compiling the pro*c code in VC++ 6.0. I'm a novice
in database-vc++ integerationn and is the first time setup and
compile being run by me. Looks like a syntax error due to setup
problem in vc++, I would appreciate if anybody could send a procedure
to setup and compile program in vc++ for both pro*c and oci methods.
Thanks in Advance.
- sn008
Error Log:
--------------------Configuration: ProcEx - Win32 Debug---------------
-----
Compiling...
ProcEx.cpp
c:my edumyprojectsprocexprocex.cpp(12) : error C2146: syntax
error : missing ';' before identifier 'SQL'
c:my edumyprojectsprocexprocex.cpp(12) : error C2501: 'EXEC' :
missing storage-class or type specifiers
c:my edumyprojectsprocexprocex.cpp(12) : fatal error C1004:
unexpected end of file found
Error executing cl.exe.
ProcEx.obj - 3 error(s), 0 warning(s)
Program:
/* Include heading files, i.e., C .h files or your own .h files */
#include <stdio.h>
#include <string.h>
/* Include the SQL communication Area. */
/* You can use #include or EXEC SQL INCLUDE. */
#include <sqlca.h>
#define ID_len 20
/* Declare variables */
EXEC SQL BEGIN DECLARE SECTION; /* Line 12 */
varchar myID[[ID_len]], mypasswd[[ID_len]];
EXEC SQL END DECLARE SECTION;
struct {
varchar name[[30]];
int stid;
int class;
VARCHAR major[[4]];
} stu_rec;
/* Indicator var: indicate the status for variables on either input
or output*/
struct { short name_ind, stid_ind, class_ind, major_ind;} stu_ind;
/* counter for total students */
int total_students = 0;
/* Declare functions */
void get_username();
void sql_error();
...main()...continued.
|
|
|
|
|
|
Request [message #94364 is a reply to message #94031] |
Tue, 07 September 2004 02:45 |
Ravi Khurana
Messages: 2 Registered: September 2004
|
Junior Member |
|
|
Hello Manish,
I want To Use Oracle 9i with C/C++.
Please Give me Some Examples of C/C++ Program. And if U can Send me Some Documentation of Pro*C Then Plz Send it through Email.
Regards,
Ravi Khurana
|
|
|
|