Qn. regarding Oracle SQL

From: Vallabhdas Dinesh K <dkv0057_at_ucs.usl.edu>
Date: Thu, 7 Apr 1994 05:48:21 GMT
Message-ID: <1994Apr7.054821.11513_at_usl.edu>


The following is a code fragment which is not working. Platform: SUNOS 4.1.2 Oracle ver: 7.0   

  EXEC SQL WHENEVER SQLERROR GOTO sqlerror;   EXEC SQL WHENEVER NOT FOUND GOTO NOT_FOUND;   EXEC SQL SELECT NAME, P.PHONE_NO

              INTO:p_name, :phone_no
              FROM PARTY 
              WHERE LOG_NUM = :log_num

   EXEC SQL COMMIT;    return (1);

sqlerror:

    printf(" FROM get-det-log \n\n% .70s \n",sqlca.sqlerrm.sqlerrmc);     EXEC SQL WHENEVER SQLERROR CONTINUE;     EXEC SQL ROLLBACK WORK RELEASE;
    exit(1);

NOT_FOUND:
    return(0);

It passes the precompling phase (ie) coverts .pc file to .c file. It flags a compilation error when it tries to compile & link the .c file to an executable.

The compiler complains that it cannot find label NOT_FOUND.

I would greatly appreciate any help. Thanks.

--
dkv0057_at_usl.edu
Received on Thu Apr 07 1994 - 07:48:21 CEST

Original text of this message