I have used a " prepareStatement " to search a table like code below.After running executeQuery, how can I distinguish number of records ? I want to print message if no data found.
PreparedStatement state = con.prepareStatement("SELECT * FROM tbname WHERE name = ?");
inputSearch =JOptionPane.showInputDialog( "Enter name to search " );
state.setString(1,inputSearch);
ResultSet result = state.executeQuery();