This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JDBC basics

 
Tetsuo Suzuki
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there a method in the JDBC ResultSet interface that can get the number of columns returned from a query?
Apologies if this question has been asked before...
Tetsuo!
 
Tetsuo Suzuki
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oops -> found the answer to my question. ResultSetMetaData interface provides a getColumnCount() method.
Ironically enough I found the solution by googling and looking at how .NET data access works. Very similar to Java.
Hm...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic