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

Home -> Community -> Usenet -> c.d.o.server -> Re: Passing a record to a Java Stored Procedure

Re: Passing a record to a Java Stored Procedure

From: Thomas J. Kyte <tkyte_at_us.oracle.com>
Date: 2000/04/21
Message-ID: <8dpgjb$3f4$1@nnrp1.deja.com>#1/1

In article <8dp1gg$krb$1_at_nnrp1.deja.com>,   chris_mcgrory_at_my-deja.com wrote:
> I wish to be able to pass a whole record eg table%
> rowtype to a Java Stored Procedure (method) and
> have the Java method calculate a CRC/Hash key to
> be returned by the function. Environment is
> Oracle 8.1.5 on Solaris.
>
> The problem is that at the PL/SQL - Java inteface
> where I delcare the data types the PL/SQL wrapper
> function won't allow a rowtype to be a parameter
> [message is PLS-00999 "Functionality Not
> implemented yet" or nearabouts]
>
> Ideally I would like to pass in a whole record
> from any table - this would allow me to detect
> record change at high speed inside the "history"
> procedures of a Datawarehouse! Currently we
> detect changes on a field by field basis big-wide
> tables are too slow....
>
> The interfacing between PL/SQL and Java is all a
> mystery to me - any information or suggestions
> gladly accepted?....
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>

you cannot send plsql records types to another but another plsql routine.

Even if you could -- you would still have to write a java stored procedure PER record type - probably not what you wanted to do (if we could pass a record to java from plsql, you would need a separate entry point for each unique record type you passed else how would it understand the datatypes, names of record fields, number of fields and so on...)

How about if you just passed the tablename and ROWID to the java stored procedure and let it run the query:

select * from T where rowid = :x

into a result set and worked from there?

--
Thomas Kyte                              tkyte_at_us.oracle.com
Oracle Service Industries
http://osi.oracle.com/~tkyte/index.html
--
Opinions are mine and do not necessarily reflect those of Oracle Corp


Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Fri Apr 21 2000 - 00:00:00 CDT

Original text of this message

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