Using ResultSets

Hey all,I'm just looking through some tutorials on using result sets, they tell me how to do most things but i also need to know what the names of the columns are that have been returned. Is it possible to get these from a resultset? How would i go about it?Thanks
[286 byte] By [Kaligulaa] at [2007-10-2 18:13:19]
# 1
ResultSetMetaData
yawmarka at 2007-7-13 19:33:15 > top of Java-index,Java Essentials,New To Java...
# 2

Once you have your recordset, you can call the getMetaData() method which returns the ResultSetMetaData object.

ResultSetMetaData rsmd = rs.getMetaData()

Refer to the javadocs for more info on the ResultSetMetaData. There are numerous things you can do with it, beyond even your request.

SteveVaya at 2007-7-13 19:33:15 > top of Java-index,Java Essentials,New To Java...
# 3
Thanks, should do the trick
Kaligulaa at 2007-7-13 19:33:15 > top of Java-index,Java Essentials,New To Java...