• Post Reply Bookmark Topic Watch Topic
  • New Topic

ResultSetMetaData  RSS feed

 
Jon Camilleri
Ranch Hand
Posts: 664
Chrome Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
An object that can be used to get information about the types and properties of the columns in a ResultSet object. The following code fragment creates the ResultSet object rs, creates the ResultSetMetaData object rsmd, and uses rsmd to find out how many columns rs has and whether the first column in rs can be used in a WHERE clause.


ResultSet rs = stmt.executeQuery("SELECT a, b, c FROM TABLE2");
ResultSetMetaData rsmd = rs.getMetaData();
int numberOfColumns = rsmd.getColumnCount();
boolean b = rsmd.isSearchable(1);


Sourced from here.

I could not find documentation for rs.MetaData(), where do I find documentation or information?

 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16060
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jon Camilleri wrote:I could not find documentation for rs.MetaData(), where do I find documentation or information?

That is because the method is not called MetaData...
 
Jon Camilleri
Ranch Hand
Posts: 664
Chrome Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jesper de Jong wrote:
Jon Camilleri wrote:I could not find documentation for rs.MetaData(), where do I find documentation or information?

That is because the method is not called MetaData...


What is it called?
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16060
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jon Camilleri wrote:What is it called?

Is that a serious question?
 
John Jai
Rancher
Posts: 1776
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jon Camilleri wrote:I could not find documentation for rs.MetaData(), where do I find documentation or information?

Did you searched getMetaData() documentation in this page? ResultSet
Why did you removed get and searched?
rs.MetaData()
 
Jon Camilleri
Ranch Hand
Posts: 664
Chrome Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
John Jai wrote:
Jon Camilleri wrote:I could not find documentation for rs.MetaData(), where do I find documentation or information?

Did you searched getMetaData() documentation in this page? ResultSet
Why did you removed get and searched?
rs.MetaData()


I found them now, sorry.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!