To say that something isn't really working
does not give us much to go on.
But I suggest that you read up on Transactions. See http://docs.oracle.com/javase/tutorial/jdbc/basics/transactions.html
Unless autoCommit
is turned on, you will need to commit
your transaction.
Also in your example, you use the ID with the value of 4
- does this really exist?