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

From: Nick Thurn <nick.thurn_at_db.com>
Date: 4 Apr 2004 20:37:47 -0700
Message-ID: <62cbbbdf.0404041937.77470770_at_posting.google.com>


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 Received on Mon Apr 05 2004 - 05:37:47 CEST

Original text of this message