How to fix the Oracle error PCC-00042: Must EXEC SQL INCLUDE SQLCA when mode=ANSI and WHENEVER SQLWARNING used?
In this post, you’ll learn more about the Oracle ErrorPCC-00042: Must EXEC SQL INCLUDE SQLCA when mode=ANSI and WHENEVER SQLWARNING used with the details on why you receive this error and the possible solution to fix it.
Oracle Error Description
PCC-00042: Must EXEC SQL INCLUDE SQLCA when mode=ANSI and WHENEVER SQLWARNING used
Reason for the Error PCC-00042: Must EXEC SQL INCLUDE SQLCA when mode=ANSI and WHENEVER SQLWARNING used
Cause: When MODE={ANSI | ANSI14}, an attempt was made to use the WHENEVER SQLWARNING statement without declaring the SQLCA. When MODE={ANSI | ANSI14}, declaring the SQLCA is optional, but to use the WHENEVER SQLWARNING statement, the SQLCA must be declared.
How to fix the Error PCC-00042: Must EXEC SQL INCLUDE SQLCA when mode=ANSI and WHENEVER SQLWARNING used ?
You can fix this error in Oracle by following the below steps
Action: Remove all WHENEVER SQLWARNING statements from the program or declare the SQLCA by hardcoding it or copying it into the program with the INCLUDE statement.
Leave Your Comment