bondito 0 Newbie Poster

Hi everyone, i am building a voting system and i am trying to count the number of votes for each candidate to be stored in a candidates table in the field voteresult, i have stored the results in a bean, and written the sql query statement in a jsp page. When i try the code the voteresult field was not updating or incrementing. Please i need a some help, any help or suggestion would be appreciated. Thanks

try {
Class.forName("com.mysql.jdbc.Driver").newInstance();
Connection c = DriverManager.getConnection("jdbc:mysql:///Voting");
Statement st = c.createStatement();
st.executeUpdate("update voters set vote1 = '" + Vote.getVote1()
+ "', vote2 = '" + Vote.getVote2() + "', vote3 = '" + Vote.getVote3()
+ "', vote4 = '" + Vote.getVote4() + "', vote5 = '" + Vote.getVote5()
+ "', vote6 = '" + Vote.getVote6()
+ "', timestamp = '" + Vote.getTimeStamp() + "', voted = '1' where username = '" + Vote.getUserName() + "'");
st = c.createStatement();
st.executeUpdate("update candidates set voteresult = voteresult + 1 where name = '" + Vote.getVote1().trim() + "'");
st = c.createStatement();
st.executeUpdate("update candidates set voteresult = voteresult + 1 where name = '" + Vote.getVote2() + "'");
st = c.createStatement();
st.executeUpdate("update candidates set voteresult = voteresult + 1 where name = '" + Vote.getVote3() + "'");
st = c.createStatement();
st.executeUpdate("update candidates set voteresult = voteresult + 1 where name = '" + Vote.getVote4() + "'");
st = c.createStatement();
st.executeUpdate("update candidates set voteresult = voteresult + 1 where name = '" + Vote.getVote5() + "'");
st = c.createStatement();
st.executeUpdate("update candidates set voteresult = voteresult + 1 where name = '" + Vote.getVote6() + "'");
st.close();