aspose file tools*
The moose likes JDBC and the fly likes How to retrieve data objects from ResultSet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "How to retrieve data objects from ResultSet" Watch "How to retrieve data objects from ResultSet" New topic
Author

How to retrieve data objects from ResultSet

abhi
Greenhorn

Joined: Dec 27, 2000
Posts: 4
Hi friends,
Well. I have been using Oracle8 in my project. Till now i have not used the data objects in Oracle. If i retrieved the data object using SQL query from Oracle8 database...ofcourse it will be received into my servlets as Resultset. How can i extract the member variables of this oracle data object. Please help it out.
Thanks .
Can you be specific and show us the exact data type in Oracle.
If it's a blob field, use ResultSet.getBlob().
If it's a JAVA data object, use ResultSet.getObject().
-Peter
Hi Peter,
Thanks. Sorry for the delay in interacting with you for further owing to bit busy. My exact doubt is that,
In Oracle8,
Suppose i have stored the data as object called "Address" in "EMP" table,ofcourse "EMP" table also contains some primitive type fields.
An object "Address" includes its member vars,
House No (varchar(15)),
Street (varchar(20).
By excuting the following query using JDBC,
"Select Address from EMP" i got the ResultSet. Then how can i extract the "Address" object and its subfields(i.e "House No" and "Street")from ResultSet.
Hope you got my doubt. Please explain.
Venu.



[This message has been edited by venugopal naradas (edited January 13, 2001).]
Peter Tran
Bartender

Joined: Jan 02, 2001
Posts: 783
Can you be specific and show us the exact data type in Oracle.
If it's a blob field, use ResultSet.getBlob().
If it's a JAVA data object, use ResultSet.getObject().
-Peter
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to retrieve data objects from ResultSet
 
Similar Threads
doubt in resultsets and queries in servlets
doubt using resultsets and queries in servlets
oracle and jdbc-odbc bridge
Delete doubt
Dynamic SQL Query Doubt