How to map an Oracle ROWTYPE to a java class with JDBC or SQLJ? 
Author Message
 How to map an Oracle ROWTYPE to a java class with JDBC or SQLJ?
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



Tue, 23 Mar 2004 22:25:17 GMT
 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



Wed, 24 Mar 2004 00:47:05 GMT
 
 [ 2 post ] 

 Relevant Pages 

1. How to map an Oracle ROWTYPE to a java class with JDBC or SQLJ?

2. Standard mapping from java.lang.sql.Types to Java.classes

3. Mapping Data Types: Oracle to Java/JDBC

4. JDBC for Oracle8: Mapping Oracle Object Types to JAVA Objects

5. Mapping Tables to Java Classes -- Products

6. Mapping DB-tables to Java-Classes

7. Mapping SQL schema to Java classes?

8. CA-SAN MATEO-258273--Java-JDBC-ORACLE-JAVA DEVELOPMENT, JSP, JDBC

9. ROWID type mapping (DB2) to and from Java JDBC

10. ROWID type mapping to and from Java JDBC

11. Curious Oracle / SQLJ / Auto Generated Java Problem

12. Using JDBC and SQLJ with Oracle Spatial


 
Powered by phpBB® Forum Software