Pessoal, vê se vcs conseguem achar algum erro nesse código:
try{
Class.forName("com.mysql.jdbc.Driver");
Connection db_novo_usuario = DriverManager.getConnection("jdbc:mysql://10.2.1.243/acesso", "root", "");
Statement sq_stmt_novo_usuario = db_novo_usuario.createStatement();
sq_stmt_novo_usuario.execute("INSERT INTO cont_acesso USUARIO VALUES "+textoacessoadministrador.getText());
}catch(Exception e){
System.out.println(e);
return;
}
está me retornando o seguinte erro:
java.sql.SQLException: Syntax error or access violation message from server: “Yo
u have an error in your SQL syntax. Check the manual that corresponds to your M
ySQL server version for the right syntax to use near 'USUARIO VALUES sadsdsdsa’
at line 1”
