I am running the following sql statement and receiving this message in the browser:

String find = "select employeeID, dependantID FROM dependant where dependantID = "+ dependantID +";";
Statement stmt3 =con.createStatement();
ResultSet res = stmt3.executeQuery(find);
out.println(res);

The variable dependantID is part of the resultSet of a previous SQL statement.
Can anyone suggest how to solve this problem? I have already tried to run the query as:
"select employeeID, dependantID FROM dependant where dependantID = "+rs.getInt("dependantID") +";";
But I got the same error message.

Regards,
Maria