zkuste tento způsobNahraďte tento Statement st = con.createStatement();
s
String query ="select * from customerinformation where pin =?"
PreparedStatement st =con.prepareStatement("query");
st.setInt(1,PIN);
ResultSet resultSet = st.executeQuery();
Nikdy byste neměli používat Statement nad PreparedStatement
if (!resultSet.next() ) {
System.out.println("resultset does not data");
} else {
do {
System.out.println(rs.getString(1)+" "+
rs.getString(2)+" "+
rs.getString(3)+" "+
rs.getString(4));
} while (resultSet.next());
}