I'm trying to access what the rowSet variable has returned i.e. it is retreving everything from properties where two conditions are met, BUT:
JdbcRowSetImpl rowSet = new JdbcRowSetImpl();
int price = 300000;
rowSet.setUrl("jdbc:mysql://localhost:3306/litrealty");
rowSet.setUsername("root");
rowSet.setPassword("");
rowSet.setCommand("SELECT * FROM properties WHERE city = ? AND price < ?");
rowSet.setString(1, l);
rowSet.setInt(2, price);
rowSet.execute();
since this piece of code is retreving these informations from the database how can I access it and i.e. put into an array so I can scroll through it then via next/previous buttons?
you can use while loop and iterate on your rowset and get the data
it would look something like this:
Instead i would suggest you to use PreparedStatement to fetch data base from database