Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: java & results sets

Re: java & results sets

From: steve <E_at_E.COM>
Date: Sat, 1 Dec 2001 17:06:01 +0800
Message-ID: <1f3qxvg.zjehx61kw3a5cN%E@E.COM>


Hi,

adding oracle's NLS package to the classpath cleared it right up??

but I'm still going to try your method.

anyway, the only problem with this approach is that i have to generate an object , for each type you want to pass back to the java client,as in ORACLE.RETURN_VARCHAR2_04 is there perhaps a better way that will allow an undefined result set to be sent back to the client without having to make an object first. steve

crappy <crappygolucky_at_hotmail.com> wrote:

> array1 = (ARRAY)((OracleCallableStatement)cstmt).getArray(1);
> Object[] vals = (Object[]) array1.getArray();
>
> for (int i = 0; i < vals.length; i++) {
> oracle.sql.STRUCT theStruct = (oracle.sql.STRUCT) vals[i];
> Datum[] attrs = theStruct.getOracleAttributes();
> System.out.println(attrs[0].stringValue() + "," +
> attrs[1].stringValue());
> }
Received on Sat Dec 01 2001 - 03:06:01 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US