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]

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.