Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Databases / September 2005

Tip: Looking for answers? Try searching our database.

Return 2 values (string, number) multiple rows, from java stored function

Thread view: 
dennis - 26 Sep 2005 18:48 GMT
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/



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.