About Gcc Error
Sir I write a program i.e for connecting oracle 10g database.
The program is
#include<stdio.h>
#include<stdlib.h>
#include"
int var1;
EXEC SQL BEGIN DECLARE SECTION;
VARCHAR ENAME[10];
int dno;
EXEC SQL END DECLARE SECTION;
main()
{
EXEC SQL CONNECT SCOTT IDENTIFIED BY TIGER;
printf(
}
it gives errors like
emp1.c:5:6: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘SQL’
emp1.c:6:9: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘ENAME’
emp1.c:8:6: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘SQL’
emp1.c: In function ‘main’:
emp1.c:11:2: error: ‘EXEC’ undeclared (first use in this function)
emp1.c:11:2: note: each undeclared identifier is reported only once for each function it appears in
emp1.c:11:7: error: expected ‘;’ before ‘SQL’
First of all i did not recognize the EXEC keyword
so please help me
For connecting the database through c i searched internet a lot but in that found lot of programs but i didn't find what are
the necessary requirements for connecting the database
So could you please tell me how to connect the database by using c language or at least help me with necessary information
Question information
- Language:
- English Edit question
- Status:
- Solved
- Assignee:
- No assignee Edit question
- Solved by:
- Jeet
- Solved:
- Last query:
- Last reply: