aspose file tools
The moose likes JDBC and Relational Databases and the fly likes Implementing SQLData and retreiveing object array Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA Java SE 8 Programmer I Study Guide 1Z0-808 this week in the OCAJP forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Implementing SQLData and retreiveing object array" Watch "Implementing SQLData and retreiveing object array" New topic
Author

Implementing SQLData and retreiveing object array

Prashanth menon
Ranch Hand

Joined: Feb 20, 2001
Posts: 65
I created an oracle object. Created a java class that implements java.sql.SQLData.
By overriding the writeSQL method I was able to pass to the data base the object.
The reverse did not work.

When I tried to retreive the sql array and subsequently the object out of the array (casted as "Sample") the following exeception occurs
java.sql.SQLException: Inconsistent java and sql object types
Can anyone give some pointer to the possible solution.
thanks
Prashanth
Prashanth menon
Ranch Hand

Joined: Feb 20, 2001
Posts: 65
Ok I got rid of the exception now.
It was because I had missed out on the default constructor.
Prashanth
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Implementing SQLData and retreiveing object array