Hi all,
I am very new to PRO C.
Am trying to execute a sample program which i found from a blog.
When i am trying to execute this i am getting one error
D:\Oracle\precomp>CL TEST.c /link TEST.exe
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
Copyright (C) Microsoft Corporation. All rights reserved.
TEST.c
TEST.c(144) : fatal error C1083: Cannot open include file: 'sqlda.h': No such file or directory
I dont have any idea about PRO C.
Kindly someone help me to understand about this..
my PRECOMP folder is located in 10gR2 ORACLE_HOME
Here is the sample program i am trying to execute, i have copied and saved as ".PC" and converted in to ".C"
then i tried to execute this and am getting this error.
+#include <stdio.h>+
+#include <string.h>+
+#include <sqlda.h>+
+#include <sqlcpr.h>+
EXEC SQL BEGIN DECLARE SECTION;
VARCHAR uid[30];
VARCHAR pwd[30];
EXEC SQL END DECLARE SECTION;
EXEC SQL INCLUDE SQLCA.H;
void main()
+{+
strcpy(uid.arr,"SCOTT");
uid.len =strlen(uid.arr);
strcpy(pwd.arr,"TIGER");
pwd.len = strlen(pwd.arr);
EXEC SQL WHENEVER SQLERROR GOTO errexit;
EXEC SQL CONNECT :uid IDENTIFIED BY :pwd;
printf("Connected to Oracle8i using Scott/Tiger\n");
EXEC SQL COMMIT WORK RELEASE;
return;
errexit:
printf("Connection failed");
return;
+} /* end of main */+