Win a flower (🌹) or copy of Real-World Software Development: A Project-Driven Guide to Fundamentals in Java (📚) this week in the Agile and Other Processes forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Liutauras Vilda
  • Knute Snortum
  • Bear Bibeault
master stewards:
  • Devaka Cooray
  • Jeanne Boyarsky
  • Junilu Lacar
garden masters:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • salvin francis
gardeners:
  • Tim Holloway
  • Piet Souris
  • Frits Walraven

Implementing SQLData and retreiveing object array

 
pioneer
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
pioneer
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
 
You save more money with a clothesline than dozens of light bulb purchases. Tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!