Syntaxerrororaccessviolation,messagefromserver:"You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '='Leandro',cpf ='[telefone removido]',rg ='[telefone removido]',data ='1/10/2003'"
Tenho quase certeza que é algum erro na concatenação. Meu código:
Uma String literal em Java tem que comecar e terminar na mesma linha. Simples
S
samurai
Beleza! Agora só não está aceitando o stm.executUpdate();!
Desde já agradeço!
cv1
Qual erro esta dando agora?
S
samurai
O erro é este:
D:TomcatworkCatalinalocalhostprojetoorgapachejspclientesalteracao2_jsp.java:70: cannot resolve symbol
symbol : method executeUpdate ()
location: interface java.sql.Statement
int res = stm.executeUpdate();
^
1 error
Este método precisa de alguma assinatura?
cv1
O método não precisa de nada, mas vc precisa ler o JavaDoc da JDBC, ou perceber que o método Statement.executeUpdate() não existe
Olha cara ainda sou novato e não quero discutir, mas eu olhei lá e tem sim.
int executeUpdate(String sql)
Executes the given SQL statement, which may be an INSERT, UPDATE, or DELETE statement or an SQL statement that returns nothing, such as an SQL DDL statement.
E está deste jeito. Insot é que eu não entendi. Será que não tem que não precisa de nenhuma assinatura mesmo?