Hi,
I have a .pc file where I would like to log oracle error in alert_log and trace log.
So I use this syntax:

Code:
EXEC sys.dbms_system.ksdwrt(3, to_char(sysdate, 'dd/mm/yyyy hh24:mi:ss') || ': Erreur SQL n' || sqlca.sqlcode + ': ' || sqlca.sqlerrm.sqlerrmc);

I have no error when I precompile this script .pc and a .c file is generated.
But when I compile the .c file, I have these errors:


--------------------Configuration: host8 - Win32 Debug--------------------
Compiling...
HOST_oracle.c
C:\Dveloppement\HOST_oracle.c(248) : error C2065: 'EXEC' : undeclared identifier
C:\Dveloppement\HOST_oracle.c(248) : error C2146: syntax error : missing ';' before identifier 'sys'
C:\Dveloppement\HOST_oracle.c(248) : error C2065: 'sys' : undeclared identifier
C:\Dveloppement\HOST_oracle.c(248) : error C2224: left of '.dbms_system' must have struct/union type
C:\Dveloppement\HOST_oracle.c(248) : warning C4013: 'to_char' undefined; assuming extern returning int
C:\Dveloppement\HOST_oracle.c(248) : error C2065: 'sysdate' : undeclared identifier
C:\Dveloppement\HOST_oracle.c(248) : error C2015: too many characters in constant
C:\Dveloppement\HOST_oracle.c(248) : error C2015: too many characters in constant

What is the syntax in Pro*c language to log oracle errors?
Thanks for your help.
Cassy.