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 -> Sending a table of entity%rowtype to a PL/SQL function form Proc*C

Sending a table of entity%rowtype to a PL/SQL function form Proc*C

From: Ludwig Macko <ludwig.macko_at_genedata.com>
Date: Fri, 18 Dec 1998 15:43:19 +0100
Message-ID: <367A6A07.A448E4D4@genedata.com>


Hi,

I would like to send an array of structs to a PL/SQL function in order to perform a bulk upload of data. The signature looks like this:

        function create_entities(p_entities in entitities.t_row_table);

and the t_row_table is defined as

	type t_row_table is table of entitities%rowtype
		index by binary_integer;


Now I would like that routine from Pro*C in such a way:

	typedef struct ent_rec {

... attributes in the order they are contained in the entity ...
} ent_rec; ent_rec ents[20];
... populate the array of structs with data ...
EXEC SQL EXECUTE /* ----- Start the PL/SQL block ----- */ BEGIN create_entities(p_entities => :ents ); END; END-EXEC; /* ----- End the PL/SQL block ----- */

I would like to do that, because my entity has a lot of attributes and I do not want to create a PL/SQL function with a VERY long signature (I would do it only, if there is no solution for the problem above).

Q: Does somebody know, if such a construct is legal and if yes, if there is some error in the stuff above, because I cannot figure out how to convince proc to map the arguments correctly. It says something like

        PLS-S-00306, wrong number or types of arguments in call to 'CREATE_ENTITIES' Many thanks

Ludwig Received on Fri Dec 18 1998 - 08:43:19 CST

Original text of this message

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