This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to get the table column names

 
Mathews P Srampikal
Ranch Hand
Posts: 211
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to get table column name using ResultsetMetadata if there is no record present in the table.Thanks
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't think having an empty resultset prevents you from accessing the ResultSetMetaData object. Have you tried it?
 
Sainudheen Mydeen
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can get the column names from ResultSetMetaData even if your resultset is empty. For example if your quey is

Still you will be able to get column names from the corresponding ResultSetMetaData.

-Sainudheen
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic