Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Where is the structure of a record stored?

Where is the structure of a record stored?

From: Hans-Juergen Klaus <hj.klaus_at_gmx.net>
Date: 14 Dec 2001 01:29:09 -0800
Message-ID: <a410593.0112140129.1f7947f8@posting.google.com>

Hello all,

I want to write a generator to wrap all packaged procedures within the ORACLE DB for an easy access from C++ or JAVA.

Now I came to a problem, that there is a package defining a type:

   CREATE OR REPLACE PACKAGE pck1
   AS

      TYPE myType IS RECORD
      (
         fac_id   NUMBER(6) := NULL,
         store_id NUMBER(6) := NULL
      );

   END pck1;

Another package is defining a stored procedure, which uses the above record type as a parameter:

   CREATE OR REPLACE PACKAGE pck2
   AS

      PROCEDURE method1 (param1 in pck1.myType);    END pck2;

From that I want to generate code like:

   EXEC SQL BEGIN DECLARE SECTION;

      long myType_fac_id;
      long myType_store_id;

   EXEC SQL END DECLARE SECTION;    ...

   EXEC SQL EXECUTE

     DECLARE
        tmpParam1 pck1.myType;
     BEGIN
        tmpParam1.fac_id = myType_fac_id;
        tmpParam1.store_id = myType_store_id;
        pck2.method1 (tmpParam1);
     END;

   END-EXEC; For generating temporary host-variables for all the elements of the record 'myType' and the correct type of the parameter in the PL/SQL block I need to know, in which DB-tables I can find information (hosting package, name and elements) about the record type.

TIA
   Hans-Juergen Klaus Received on Fri Dec 14 2001 - 03:29:09 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US