Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> PL/SQL RECORD type used in Pro*C
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;
PCC-S-02350, cannot equivalence this SQL type
myPkg.updateRow(:myRow); ............................1
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
![]() |
![]() |