This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes JDBC and the fly likes MetaData Incomplete? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "MetaData Incomplete?" Watch "MetaData Incomplete?" New topic
Author

MetaData Incomplete?

Gregg Bolinger
Ranch Hand

Joined: Jul 11, 2001
Posts: 15230

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
Ranch Hand

Joined: Jul 11, 2001
Posts: 15230

Ok, figured out the length. Still needing the others.
Bas Holland
Greenhorn

Joined: Jun 20, 2003
Posts: 4
Hello Gregg Bolinger,

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

I'm still searching , please : let me know!


Be nice .... as always :P
Shailesh Chandra
Ranch Hand

Joined: Aug 13, 2004
Posts: 1076


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 ]

Gravitation cannot be held responsible for people falling in love ~ Albert Einstein
Shailesh Chandra
Ranch Hand

Joined: Aug 13, 2004
Posts: 1076

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 ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: MetaData Incomplete?
 
Similar Threads
Values after Submit Button pressed
Passed with 83% (5/9/2007)
Passing Percentage???
Patterns Complete References
Assertion enable or not?