By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,501 Members | 1,861 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,501 IT Pros & Developers. It's quick & easy.

Returning Variant data from Java to PL/SQL & SQL?

P: n/a
Folks,

I'm trying to define a oracle Java Stored Proc interface to an
existing timeseries database. Series are accessed by name and are
returned as vectors of type pairs, specifically (Date, number) (Date,
date), (date, string), (number, number), (number, date) or
(number,string).

I could simply create all the types and their table types

create or replace type xxx_datnum_t as object
( item DATE, value NUMBER );
/
...

create or replace type xxx_datnum_tab as table of xxx_datnum_t;
/
...

then access these types from Java via the StructDescriptor and
ArrayDescriptor apis while defining multiple typesafe call_specs to
access the data from PLSQL and SQL.

The problem with this solution is it requires my PL/SQL code to know
in advance what the return type will be from a request.

Is there any way to build and return types in Java and then return
them to Oracle? (apart from returning everything as a string!!) I
suspect there isn't but you never know your luck!!

Any help on this would be greatly appreciated (including being told
it's not possible!.

Thanks
Nick
Jul 19 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.