Bom dia pessoal, ainda estou com problemas para fazer o delete.
O comando sql funciona perfeitamente estou usando o mysql front o problema é quando tento rodar o eclipse.
Instrução SQL utilizada :
delete from pessoa where nome="helber" and rg="242424" and cpf="2672199" and dtnascimento = " 2013-01-12 00:00:00";
package br.com.people.main;
import java.sql.Connection;
import java.util.Calendar;
import br.com.people.connection.factory.ConnectionFactory;
import br.com.people.dao.PessoaDAO;
import br.com.people.dao.impl.PessoaDAOImpl;
import br.com.people.tabela.Pessoa;
public class MainDelete {
public static void main(String[] args) {
try {
//Abrir a Conexao
Connection conn = ConnectionFactory.getConnection();
PessoaDAO daoPessoa = new PessoaDAOImpl(conn);
daoPessoa.delete(new Long(5));
System.out.println("Apagado com Sucesso!!!.");
//Sempre Fechar a Conexão.
conn.close();
} catch (Exception e) {
e.printStackTrace();
}
}
}
[Erro informado Eclipse]
MENSAGEM DE ERRO: 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 'pessoa=1' at line 1