need help with ResultSets !!!
Hey everyone...I have a little problem that I just can't solve alone :(
After struggling a lot with jdbc drivers and stuff....I finally managed to connect eclipse to postgresql...but another problem occured...I attached 2 pictures..one with my table in pgadmin and one with the code in eclipse....so what I want to do is that :
I need the first row (12, sda ,12) to do something with it...and the second row(23, a ,21) to do something else with it..like to separate them...I tried different things like making 2 ResultSet variables and 2 different while loops:
res = sqlCommand.executeQuery("SELECT * FROM adi WHERE num = 1;");
res2 = sqlCommand.executeQuery("SELECT * FROM adi WHERE num = 2;");
...but that didn't worked..so has anyone any idea how I could access the 2 rows separately???...I'm working on a GUI for a bigger project and I need separate rows to insert the data from each row to a different player(it's a football database) in a different window(JFrame)
Thanks very much in advance !!!!!