This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JDBC and the fly likes Accessing SQL Object type Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Accessing SQL Object type" Watch "Accessing SQL Object type" New topic
Author

Accessing SQL Object type

Srikanth Basa
Ranch Hand

Joined: Jun 06, 2005
Posts: 241
I have to access SQL object types. One approach I know is to implement the SQLData interface and create classes for the type objects.

Is there any other mechanism to access ?

One simple way I see is using STRUCT. But I have nested Structures. Whether it is possible to retrieve all the attributes in nested structures without using the SQLData ?
[ March 01, 2007: Message edited by: Srikanth Basavaraju ]
Srikanth Basa
Ranch Hand

Joined: Jun 06, 2005
Posts: 241
Just thought of sharing that the following approach served my purpose.

I had a structure and within the structure they were simple attributes and some were Table types.



If you are looking for similar solution, hope you can do some research on above snippet to understand it

Cheers
Srikanth
[ March 01, 2007: Message edited by: Srikanth Basavaraju ]
 
 
subject: Accessing SQL Object type
 
Similar Threads
Complex data object returned from oracle
What is it?
PreparedStatement setObject Woes
100% CPU usage on JBoss with 8GB memory
Java to OODBMS code in Oracle --- Please help me out