Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How to map an Oracle ROWTYPE to a java class with JDBC or SQLJ?
In article <9pkftf$juu$1_at_newsg2.svr.pol.co.uk>, "Adam says...
>
>Folks,
>
>
>I need to call an Oracle 8.1.6 stored proc froma Java prog via SQLJ.
>The proc accepts 1 param, which the "%rowtype" of the table that it inserts
>into.
>
>Does anyone know how to map the "%rowtype" type to a Java class?
>
>I have looked through the SQLJ and JDNC docs, and it seems to deal with
>mapping every other oracle special type but %rowtype :-)
>
>
>Thanks in advance...
>
>
>Cheers - Adam
>
>
>
you cannot bind to a plsql record type from anything other then plsql. you'll need to execute a block like this:
declare
l_rec T%rowtype;
begin
l_rec.c1 := ?; l_rec.c2 := ?; l_rec.c3 := ?;
and bind the individual components.
-- Thomas Kyte (tkyte@us.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 Fri Oct 05 2001 - 11:47:05 CDT
![]() |
![]() |