Handeling error in Pro*c
From: H.M.B. van den Bulk <hvdbulk_at_drd.com>
Date: 1995/05/17
Message-ID: <3pdtjn$5cd_at_dildog.lgc.com>#1/1
./pcc/foo.pc
84 EXEC SQL WHENEVER SQLERROR DO sql_error("A Oracle error");
./pcc/foo.pc
Henri van den Bulk
hvdbulk_at_drd.com (currently not available) Received on Wed May 17 1995 - 00:00:00 CEST
Date: 1995/05/17
Message-ID: <3pdtjn$5cd_at_dildog.lgc.com>#1/1
Can somebody please explain something to me about a piece of documentation in the Oracle programmer's guide for Pro*C.
This documentation says that you can give parameters to error handling routines. Whell the following example:
EXEC ORACLE OPTION (ORACA=YES);
EXEC SQL WHENEVER SQLERROR DO sql_error("A Oracle error");
EXEC SQL SELECT * FROM emp;
void sql_error( char *errmsg )
{
}
When I try to precompile this with proc it gives me a error; 84 EXEC SQL WHENEVER SQLERROR DO sql_error("A Oracle error");
84 ........................................^ PCC-S-0018: Expected ")", but found ""A Oracle error" at line 84 in file
./pcc/foo.pc
84 EXEC SQL WHENEVER SQLERROR DO sql_error("A Oracle error");
84 .............................................................^ PCC-S-0054: Expected End-of-Statement at column 62 in line 84 of file
./pcc/foo.pc
Now what is wrong, the documentation or my implementation. By the way I used the example on page 8-34 & 8-35.
Thanks.
Henri van den Bulk
hvdbulk_at_drd.com (currently not available) Received on Wed May 17 1995 - 00:00:00 CEST