public FileDataInfo getAttachmentInfo(int id) throws SQLException {
Connection connection = this.dataSource.getConnection();
PreparedStatement st = connection.prepareStatement(dbDriver
.getQueries().getForumQueries().getSql_GET_ATTACH_INFO());
ResultSet rs = null;
FileDataInfo fileData = new FileDataInfo();
try {
st.setInt(1, id);
rs = (ResultSet) st.executeQuery();
if (rs.next()) {
fileData.setId(rs.getInt("id"));
fileData.setName(rs.getString("attach_name"));
fileData.setContentType(rs.getString("attach_content_type"));
fileData.setDescription(rs.getString("attach_description"));
fileData.setMessageId(rs.getInt("message_id"));
fileData.setSize(rs.getInt("attach_size"));
}
return fileData;
} finally {
if (rs != null) {