Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ResultSetMetaData

843859Apr 3 2007 — edited Apr 3 2007
Hi,
My question is about retrieving resultsetmetadata from the resultlset.
I've seen many examples of using resultsetmetadata and they all of the form
...
ResultSet rs = statement.executeQuery("select * from Foo_Table");
ResultSetMetaData metadata = rs.getMetaData();
// process metadata, usually match column names with bean names.
...
My question is: Do I need to do it all the time I run the same query?
In other words, can I save the data I need from the ResultSetMetaData and use it later for the same query? I am concern only about column count and column names.
Am I guaranteed to have the same column count, order and types for the same query?

Thanks.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 1 2007
Added on Apr 3 2007
1 comment
118 views