I am trying to call an SQL/PL function from within my C program. I am in a Linux enviroment running Oracle 8i. I can open up SQL*PLUS and run the function, but when I compile my C program it bombs with the error, PLS-S-00201, identifier 'CREATEACCOUNT' must be declared. I have tried both of the following without success. Please help. Thanks in advance.
Code:
int exec_stored_procedure() {
int n;
EXEC SQL CALL createAccount() INTO :n ;
return(sqlca.sqlcode);
}
AND
int exec_stored_procedure() {
int n;
EXEC SQL EXECUTE
BEGIN
:n:=createAccount();
END;
END-EXEC;
return(sqlca.sqlcode);
}