Pro*C PL/SQL bug. Is upgrade the solution?

From: Mark Miller <mmille10_at_earthlink.net>
Date: Thu, 19 Nov 1998 20:32:34 -0700
Message-ID: <3654E2D2.415B_at_earthlink.net>



[Quoted] I have found a bug in the Pro*C compiler I am using, in relation to PL/SQL blocks. We have Oracle 7.3.2.2.0, and the Pro*C version is 2.2.2.0.0, running on SCO OpenServer, Release 5.

I am trying to get a Pro*C program to interface with the CAPI/TAPI packages and stored procedures generated by D2K. Most of it works, except for one part.

Here is what I have tried:

EXEC SQL EXECUTE
   DECLARE

      cwblah   cw$checklist_items.cw$ind_type;
      record   cw$checklist_items.cw$row_type;
   BEGIN
      record.datetime := to_date(:expireDate,
         'YYYYMMDDHH24MI');
      record.file_name := :filename;                    
      cwblah.id := :value;

      cw$checklist_items.ins(record, cwblah);
   END;
END-EXEC; [Quoted] Pro*C complains that the line

cwblah.id := :value;

is an invalid reference to variable "cwblah".

So the situation is I can declare cwblah as a cw$ind_type, but I can't assign any values to it. This is a problem, since CAPI/TAPI sets the indicator columns in the cw$ind_type to FALSE by default. The "ins" stored procedure will interpret this as though I am passing in a record with all null values (which I am not). The distinction we discovered is that the cw$row_type is a PL/SQL record type that uses actual table column types to define its columns. The cw$ind_type is purely a PL/SQL record type that does not use table columns to define its columns.

We tried compiling this same module with a Windows Pro*C, Version 8.0 precompiler, and it accepted the above code.

We are considering upgrading our SCO box to Oracle 7.3.4, so that we can compile the above code, and other modules that use the CAPI/TAPI stored procedures. The thing is, we don't know if doing this will actually fix the bug I am encountering. Does anyone know if this bug has been fixed in Oracle 7.3.4?

Also, is it possible to upgrade just the Pro*C precompiler? In other words, is it possible to leave Oracle 7.3.2 as it is, and just install over the old version of Pro*C? Will the new Pro*C still work with 7.3.2? Are there incompatibilities to consider?

Thanks,

---Mark
mmiller_at_nyx.net Received on Fri Nov 20 1998 - 04:32:34 CET

Original text of this message