the word recordset threw me because i think that's a VB term... but I'm assuming that you're using Java given the location of your post. Super easy to do what you're talking about. From the java.sql.ResultSet, you can call getMetaData(), and from the metadata object you can find out tons of stuff. Looks like this (I'm abbreviating):
String sql = "SELECT * FROM....";
Connection con = [establish connection];
Statement stmt = con.createstatement();
ResultSet rs = stmt.executeQuery(sql);
ResultSetMetaData rsmd = rs.getMetaData();
then you can call:
rsmd.getColumnCount()
rsmd.getColumnName(int)
rsmd.getColumnType(int) - gives you a java.sql.TYPES int
and so on
that help?