1 Reply Latest reply on Apr 27, 2012 7:19 PM by 931576

    problem Compiling with SQLCHECK=SEMANTICS in C, throws ORA-00942


      I am trying to execute a remote procedure in pro*c , after googling i found that the syntax i should use is this:

      EXEC SQL EXECUTE begin



      and when i try to compile it i get the next message:

      PCC-S-02322, found undefined identifier
      Semantic error at line 514, column 12, file caecp.pc:
      EXEC SQL EXECUTE begin
      PCC-S-02345, SQLCHECK=SEMANTICS must be given when embedded PL/SQL blocks are used

      And so if i add the flag i end up with lost of errors of the same type:
      Error at line 37, column 2 in file main.pc
      EXEC SQL select
      CSF-S-00000, ORA-00942: table or view does not exist
      I know the table exists and that i have access to them since i can do the queries directly on sqlplus.

      this are the flags am using to compile:
      /az/oracle11g/oracle/product/11.2.0/db_1/bin/proc iname=main INCLUDE=. INCLUDE=/az/sms/library/library/include INCLUDE=/az/oracle11g/oracle/product/11.2.0/db_1/precomp/public CPOOL=YES CTIMEOUT=300 LINES=YES MODE=ANSI COMMON_PARSER=YES CODE=ANSI_C SQLCHECK=SEMANTICS

      Pro*C/C++: Release - Production on Wed Apr 25 10:49:32 2012

      Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.

      System default option values taken from: /az/oracle11g/oracle/product/11.2.0/db_1/precomp/admin/pcscfg.cfg
      Any ideas???