include sqlca

Description

Defines the SQL Communications Area (SQLCA) in an Embedded SQL program.

Syntax

exec sql include sqlca end-exec

Examples

Example 1

 EXEC SQL INCLUDE SQLCA END-EXEC.
 
           ...
 
      EXEC SQL UPDATE test SET col1 = col1 + 100 END-EXEC.
      IF SQLCODE = 0
           DISPLAY "UPDATED ",SQLERRD(3), " ROWS."
      ELSE
      IF SQLCODE = 100
                DISPLAY "NO ROWS WERE AFFECTED."
           ELSE
      DISPLAY "AN ERROR OCCURED - ",SQLERRMC.
           END-IF
      END-IF.
      EXEC SQL COMMIT WORK END-EXEC.

Usage

See also

begin declare section