Skip to Main Content

Java and JavaScript in the Database

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Pass table rowtype between java class and PL/SQL package

mojofilterFeb 15 2007 — edited Feb 20 2007
I am a complete newbie when it comes to java itself but I've been asked to investigate the possibility of passing a rowtype datatype from a PL/SQL package to a java class and vice versa.

I have heard of oracle.sql.ArrayDescriptor as an option but this appears to address only SQL types that are defined outside of a package.

I'm talking about using, say, SCOTT.EMP%rowtype instead of a user-defined type. I'm thinking that a java array could be defined from the definition of a table in the database but I don't know what class would be appropriate.

Could someone provide a simple proof-of-concept example that shows how you could use a java array to pass data to a package that is expecting a table rowtype variable and conversely a java class that reads the rowtype returned into a java array?

Would oracle.jdbc.driver.OracleDatabaseMetaData be a way of doing this?

Thanks!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 20 2007
Added on Feb 15 2007
9 comments
8,673 views