You have used sqlselect twice -- given the corrected code. Check if this works String sqlInsert = " Update Table1 Set ort = 'C' WHERE ID = '10' "; pepaw = conn.prepareStatement(sqlInsert);