Problem on compilation [message #339017] |
Wed, 06 August 2008 09:34 |
hariprasad
Messages: 5 Registered: August 2008
|
Junior Member |
|
|
hi friends,
i am new to to proc and trying write some demo programs.
#include<stdio.h>
#include</ora10gclnt/product/10.2.0/db_1/precomp/public/sqlca.h>
char userid[30] = "billing/dbname@passwd";
void sql_error();
int main()
{
int emp_id;
float raise_sal;
EXEC SQL WHENEVER SQLERROR do sql_error("Oracle error");
EXEC SQL CONNECT :userid;
printf("Connected.\n");
printf("\nEnter the EmpID: ");
scanf("%d",emp_id);
printf("\nEnter the raise_sal: ");
scanf("%f",raise_sal);
EXEC SQL EXECUTE
BEGIN billing.RAISE_SALARY
(:emp_id, :raise_sal);
END;
END-EXEC;
EXEC SQL COMMIT WORK RELEASE;
return 0;
}
when i am compailing it with options
proc SQLCHECK=SEMANTICS MODE=ORACLE iname=pro_emp.pc
it is giving me error like
Error at line 27, column 8 in file pro_emp.pc
BEGIN billing.RAISE_SALARY
.......1
PLS-S-00201, identifier 'BILLING.RAISE_SALARY' must be declared
Error at line 27, column 8 in file pro_emp.pc
BEGIN billing.RAISE_SALARY
.......1
PLS-S-00000, Statement ignored
Semantic error at line 27, column 2, file pro_emp.pc:
BEGIN billing.RAISE_SALARY
.1
PCC-S-02346, PL/SQL found semantic errors
can any one help me please.
will appreciate.
|
|
|
|
Re: Problem on compilation [message #339177 is a reply to message #339021] |
Thu, 07 August 2008 00:23 |
hariprasad
Messages: 5 Registered: August 2008
|
Junior Member |
|
|
Michel,
yes you r correct.
that was a typing mistake by me.
on my program i have written the correct one and even after that i am geting the same problem as i have explained.
any idea why it is ?
|
|
|
|
Re: Problem on compilation [message #339192 is a reply to message #339186] |
Thu, 07 August 2008 01:08 |
hariprasad
Messages: 5 Registered: August 2008
|
Junior Member |
|
|
Hi michel,
when i comiled the way u told me, it is compiling with proc.
and when i am compiling the .c file with gcc it giving me problem like this.
bash-3.00$ gcc -L /ora10gclnt/product/10.2.0/db_1/lib32 -lclntsh pro_emp.c -o pro_emp
Undefined first referenced
symbol in file
sql_error /var/tmp//cckIc8J6.o
ld: fatal: Symbol referencing errors. No output written to pro_emp
collect2: ld returned 1 exit status
any soln.
Regards,
HARI
|
|
|
|