ResultSet, Does Column exist
843859Sep 24 2007 — edited Sep 25 2007Hi, I have a ResultSet and I need to know if a certain column exists. I can't find any way to do this except using this try/catch statement.
try
{
col = Integer.valueOf(resultSet.getInt("col2"));
}catch(Exception e)
{
col = Integer.valueOf(resultSet.getInt("col1"));
}
There has got to be a better way to do this, can someone please help. Thanks,