Extracting ResultSetMetaData from Spring JdbcTemplate

This is in response to a programming problem where extracting ResultSetMetaData from Spring JdbcTemplate was the requirement. Spring provides a wrapper over ResultSet and gives us the options to map the returned RestultSet with an object of our choice. This is easily achieved by using RowMapper interface. Below is a sample code for the usage of RowMapper: [crayon-58ff0b5e1a8ca764777725/] This can be easily done using RowMapper if the returned ResultSet is not empty. The problem arrives when the ResultSet is empty. The ResultSet is closed and it can't be used to fetch the ResultSetMetaDat...
Read More