Re: OLE C++: passing record/table of records as IN/OUT parameter to stored procedure
Date: 16 Feb 2003 10:27:36 -0800
Message-ID: <b2ol6o01f8l_at_drn.newsguy.com>
In article <4e41037a.0302160618.11d48b1a_at_posting.google.com>,
Natasha.Ponomariova_at_comverse.com says...
>
>Hi,
>
>I have the following code written:
>---------------------------------------------------
>TYPE DedId_NtfyStatus_rec_type IS RECORD (
> id ddctn_info.ddctn_id%TYPE,
> status ddctn_info.ddctn_ntfy_status%TYPE);
>TYPE DedId_NtfyStatus_tbl_type IS TABLE OF DedId_NtfyStatus_rec_type
>INDEX by binary_integer;
>
>PROCEDURE UPD_EXP_DDCTN_NTFY_INFO( p_DedId_NtfyStatus_tbl IN
>DedId_NtfyStatus_tbl_type, p_NotFoundStr OUT VARCHAR2);
>----------------------------------------------------
>The problem is as follows:
>How can I pass the DedId_NtfyStatus_tbl_type (array of records) from
>C++ to the UPD_EXP_DDCTN_NTFY_INFO stored procedure?
>Vise versa is relevant too, i.e., in case that I should read array of
>records from stored procedure.
>
>I found the following methods:
>
>OParamArray AddTable(const char *name, int iotype, int servertype, int
>ArraySize, int ElementSize)
>OParamArray AddTable(const char *name, int iotype, int serverType, int
>Dimension, int Size=0, char* object_name = NULL);
>
>But I don't know how to use the methods in this specific case anf if
>these methods are relevant at all.
>
>Thank you in advance,
>Natasha.
You cannot pass a table of plsql only types from anything other then plsql.
You may use collections of objects
create type myRecordType as object ( x int, y date, z varchar2 )
/
create type myArrayType as table of myRecordType
/
in sql -- and then both PLSQL and C/C++ can access them.
-- Thomas Kyte (tkyte_at_oracle.com) http://asktom.oracle.com/ Expert one on one Oracle, programming techniques and solutions for Oracle. http://www.amazon.com/exec/obidos/ASIN/1861004826/ Opinions are mine and do not necessarily reflect those of Oracle CorpReceived on Sun Feb 16 2003 - 19:27:36 CET