I would like to return 2 values (String, number prefered but String,
String will work) from a java stored function.
I was able to successfully return a varray of varchar2 values but I was
wondering if it is possible to return 2 values by using a varray?
Is it even possible? I tried using combinations of types which included
a varray of objects (with 2 attributes) or a type as table of objects
but I couldn't figure out how in my java code to set these values. Also
what would my java function return type be and what Oracle type would
map to it?
Any help and examples or pointers would be great.
Thanks,
Dennis
Thomas Hawtin - 26 Sep 2005 20:56 GMT
> I would like to return 2 values (String, number prefered but String,
> String will work) from a java stored function.
I've not used Oracle Java stored procedures, but in general
CallableStatement statement should be what you want.
http://java.sun.com/j2se/1.5.0/docs/api/java/sql/CallableStatement.html
It supports out parameters (and multiple ResultSets).
Tom Hawtin

Signature
Unemployed English Java programmer
http://jroller.com/page/tackline/