i mysql syntax error when running file aspirantes.java in netbeans:
com.mysql.jdbc.exceptions.jdbc4.mysqlsyntaxerrorexception: have error in sql syntax; check manual corresponds mysql server version right syntax use near 'telefono1 = '01 800 021 1000',telefono2 = '01 800 433 2000',carrera = 'it',promedio = '100',where ficha = 6' @ line 1
i can't figure out what's wrong. java code can seen (and downloaded) @ http://www.mediafire.com/view/?i37ccovyvcky8ai. error seems in lines 584 596, in mysql update sentence.
the "datos" table looks this:
any idea on how can solve this? thank in advance. cheers!
here's current code:
ssql = "update datos " + "set apellido1 = ?," + "apellido2 = ?," + "nombre = ?," + "genero = ?," + "telefono1 = ?," + "telefono2 = ?," + "carrera = ?," + "promedio = ?," + // <<== remove trailing comma "where ficha = " +id_actualizar;
the problem have comma
before where
clause.
Comments
Post a Comment