This week's giveaway is in the Spring forum.
We're giving away four copies of Learn Spring Security (video course) and have Eugen Paraschiv on-line!
See this thread for details.
Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Implementing SQLData and retreiveing object array

 
Prashanth menon
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok I got rid of the exception now.
It was because I had missed out on the default constructor.
Prashanth
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic