• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

MetaData Incomplete?

 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am needing to get some information about the columns in my database but I am not sure if the ResultSetMetaData is incomplete or if there is another way to obtain this information.
I am needing to get the length, default value, and description of each column in a table.
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, figured out the length. Still needing the others.
 
Bas Holland
Greenhorn
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Gregg Bolinger,

you did find out how to read the length of a resultSet.

I'm still searching , please : let me know!
 
Shailesh Chandra
Ranch Hand
Posts: 1082
Java Oracle Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Gregg Bolinger:

I am needing to get the length, default value, and description of each column in a table.


DatabaseMetaData will do this job

here is the method I had written for one of the previous post




thanks
[ April 11, 2005: Message edited by: Shailesh Chandra ]
 
Shailesh Chandra
Ranch Hand
Posts: 1082
Java Oracle Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just Wanted to mention that this method was written for one column
to get Details of all columns pass the "%" as the value of argument
String ColumnName, and change if(rs.next()) to while(rs.next())

Bas Holland : Just noticed that that original post is more than 1 year old its better to start a new thread

Shailesh
[ April 11, 2005: Message edited by: Shailesh Chandra ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic