
How to map an Oracle ROWTYPE to a java class with JDBC or SQLJ?
Quote:
>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 := ?;
proc( l_rec );
end;
and bind the individual components.
--
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 Corp