How to get equivalent of ResultSetMetaData without ResultSet

Posted by javanix on Stack Overflow See other posts from Stack Overflow or by javanix
Published on 2010-04-01T22:17:46Z Indexed on 2010/04/01 22:23 UTC
Read the original article Hit count: 302

Filed under:
|
|

Hey Guys -

I need to resolve a bunch of column names to column indexes (so as to use some of the nice ResultSetMetaData methods). However, the only way that I know how to get a ResultSetMetaData object is by calling getMetaData() on some ResultSet.

The problem I have with that is that grabbing a ResultSet takes up uneccesary resources in my mind - I don't really need to query the data in the table, I just want some information about the table.

Does anyone know of any way to get a RSMD object without getting a ResultSet (from a potentially huge table) first?

Thanks!

© Stack Overflow or respective owner

Related posts about java

Related posts about mysql