Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

query result as list

 
nimo frey
Ranch Hand
Posts: 580
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have something like this:



But the extracted Values are of type Object[] ([Ljava.lang.Object;@1a40f08). How can I extract the datas from the Object[] ?
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just as you would use any array in Java: by getting the value for a particular element, e.g.:

 
nimo frey
Ranch Hand
Posts: 580
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
oh yes, thanks: That worked:

 
Sandeep Murthy
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The order of the elements returned will be similar to the order of the columns in database.
Can we use SQLResultSet for specifying custom order?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic