i am not able to retrive the data from oracle9i ..using oracle.sql.STRUCT i.e objects in oracle...
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   ullas_kumar
Posted On:   Monday, July 26, 2004 02:24 AM

hello , i am facing problem while retriving data from oracle9i..the data retrived is in hexadecimal format but in case of 8i it is giving correst results...i have pasted the code which i tried.....rs is result set obtained from select query oracle.sql.STRUCT oracleSTRUCT=((OracleResultSet)rs).getSTRUCT(2); oracle.sql.Datum[] attrs = oracleSTRUCT.getOracleAttributes(); for ( int i = 0 ; i < attrs.length; i++) System.out.println("Name is " + attrs.stringValue()); if executed in oracle8i for the bello given table structure it gives the correct value but for 9i it doesn't // SQL create or replace type ADDRESS as object ( DOORN   More>>

hello ,


i am facing problem while retriving data from oracle9i..the data retrived is in hexadecimal format but in case of 8i it is giving correst results...i have pasted the code which i tried.....rs is result set obtained from select query



oracle.sql.STRUCT oracleSTRUCT=((OracleResultSet)rs).getSTRUCT(2);

oracle.sql.Datum[] attrs = oracleSTRUCT.getOracleAttributes();

for ( int i = 0 ; i < attrs.length; i++)

System.out.println("Name is " + attrs.stringValue());


if executed in oracle8i for the bello given table structure it gives the correct value but for 9i it doesn't




// SQL
create or replace type ADDRESS as object
( DOORNUM char(10), STREET char(10), CITY char(10)); /

create table Emp ( ID NUMBER(3) , addr ADDRESS );
);
INSERT INTO Emp values ( 1, ADDRESS('aa','aaa','aaaa'));
);
INSERT INTO Emp values ( 2, ADDRESS('bb','bbb','bbbb'));

...please help
thanks
ullas    <<Less
About | Sitemap | Contact