PRO*COBOL Problem!

From: <eraskin_at_my-deja.com>
Date: Fri, 29 Oct 1999 17:12:03 GMT
Message-ID: <7vckgv$1ea$1_at_nnrp1.deja.com>



[Quoted] Is there anyone out there using PRO*COBOL for Oracle 8i (8.1.5). I'm getting an error when using a "RETURNING <field> INTO <bindvar>" clause.

The example statement is:

  EXEC SQL
    INSERT INTO CUSTOMER

[Quoted]       (CUSTNAME, CUSTPHONE)
     VALUES
      ('TEST CUSTOMER', '123-456-7890')
     RETURNING CUSTKEY INTO :ws-custkey:ws-custkey-ind
  END-EXEC. [Note that CUSTKEY is initialized from a sequence in an insert trigger]

[Quoted] When this code is executed, I get the following error:

   ORA-24343: user defined callback error

When I remove the RETURNING clause, the error goes away.

The CUSTKEY column is NUMBER(7,0) and ws-custkey is PIC s9(9) comp-5. ws-custind is pic s9(4) comp-5.

Does anyone have any advice on what's wrong? If not, is there a workaround  or another way to get the primary key back after it was assigned in a trigger?

TIA Eric Raskin
eraskin_at_paslists.com
[Quoted] ericraskin_at_hotmail.com

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Fri Oct 29 1999 - 19:12:03 CEST

Original text of this message