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

Home -> Community -> Usenet -> c.d.o.misc -> PL/SQL RECORD type used in Pro*C

PL/SQL RECORD type used in Pro*C

From: paul cluiss <paul_cluiss_at_intervoice.com>
Date: Tue, 28 Sep 1999 12:38:36 -0500
Message-ID: <FAA1DDE790AA03D3.7F0C400E2BAB8908.94DA48C5B917E55B@lp.airnews.net>


Hello everyone,

I am trying to use in my Pro*C program a RECORD type which is defined in an Oracle package written in PL/SQL. I have defined the RECORD type like this:

/* PL/SQL code */

CREATE OR REPLACE PACKAGE myPkg
AS
  TYPE myRowtype IS RECORD
  (
    id NUMBER(10),
    name VARCHAR(32)
  );
  PROCEDURE updateRow(newRow IN myRowtype); END myPkg;

In my Pro*C program I would like to call myPkg.updateRow() passing it a parameter of myPkg.myRowtype, but I can't seem to come up with a way of typdefing the parameter type to the satisfaction of the Pro*C pre-compiler. EG, when I do something like this:

/* Pro*C code */

typedef struct myInfo myRowtype;
EXEC SQL TYPE myRowtype IS myPkg.myRowtype;

void update()
{
  EXEC SQL BEGIN DECLARE SECTION;
    myRowtype myRow;
  EXEC SQL END DECLARE SECTION;   myRow.id = 99;
  strcpy(myRow.name, "jake");

  EXEC SQL EXECUTE

        BEGIN
          myPkg.updateRow(:myRow);
        END;

  END-EXEC; I get the following pre-compiler error:

PCC-S-02350, cannot equivalence this SQL type

                                myPkg.updateRow(:myRow);
............................1

PLS-S-00422, no PL/SQL translation for the bindtype given for this bind variable

Does anyone have any ideas how to use inside Pro*C programs record types which are declared inside PL/SQL packages? I've checked the demo modules, but didn't find anything.

Thanks

---
Paul Cluiss
Dallas, Texas Received on Tue Sep 28 1999 - 12:38:36 CDT

Original text of this message

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