leun, it may be possible because you are declaring
' i ' in the actionPerformed()........ i think you should
declared it as static at the class level......... because each time you press button the event is generated and new ' i ' values are stored.....
yes you can perform operation that sql does....... here also.......... but with minor changes..........
here in our program accessing information from database returns the ResultSet object on executeQuery() method call on Statement object...............
for update, insert, delete,create ........ these all queries make changes to database so what we have to use is method executeUpdate() on Statement object......... it returns int......... (for example if you run update query than it returns the number of rows updated)..............
as you asked about updating balance of particular user........ yes we can....... we have to use WHERE clause in sql query.......
for example........
UPDATE loginTable SET balance=2000 WHERE user='ravin' AND password='1234';
for learning more about sql queries you can read w3shools
SQL tutorial...... it will help faster learning.......
thanks.........