i have a problem to retrieve my column data from the access database.

Access get the data in the database but is not return anything.

can anyone tell me how to retrive the data?

source code:

s.execute("INSERT INTO tableFaculty (FacultyName)VALUES "+" ('" + f.getFacultyName() + "')");

//Return the primary key
s.execute("SELECT @@IDENTITY");
ResultSet result = s.getResultSet();


int id= result.getInt(0);

s.execute("select * from tablefaculty where facultyname = "+ id);

//ResultSet result = s.getResultSet();
JOptionPane.showMessageDialog(null,"yes");
JOptionPane.showMessageDialog(null, result.getRow());
JOptionPane.showMessageDialog(null, result.getString(2));