Estou tentando fazer um update em um banco de
dados, só que ele gera a seguinte exception => java.sql.SQLException:
[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected
16.
Alguém pode me dar uma ideia??????
updateStatement
=
dbConnection.prepareStatement("update pessoas set nome =?,endereco=?,bairro=?,cep=?,"+ "cidade=?,estado=?,ddd=?,fone_res=?,fone_com=?,fone_cel=?,"+ "email=?,profissao=?,faculade=?,mensagem=? where nro=?"); System.out.println("ye1"); updateStatement.setString(NOME_POSITION, nomex); updateStatement.setString(ENDERECO_POSITION, enderecox); updateStatement.setString(BAIRRO_POSITION, bairrox); updateStatement.setString(CEP_POSITION, cepx); updateStatement.setString(CIDADE_POSITION, cidadex); updateStatement.setString(ESTADO_POSITION, estadox); updateStatement.setInt(DDD_POSITION, dddx); updateStatement.setString(FONE_RES_POSITION, fone_resx); updateStatement.setString(FONE_COM_POSITION, fone_comx); updateStatement.setString(FONE_CEL_POSITION, fone_celx); updateStatement.setString(EMAIL_POSITION, emailx); updateStatement.setString(PROFISSAO_POSITION, profissaox); updateStatement.setString(FACULDADE_POSITION, faculdadex); updateStatement.setString(MENSAGEM_POSITION, mensagemx); updateStatement.setInt(15, nrox); System.out.println("ye2"); updateStatement.executeUpdate(); _______________________________
Juliano Moraes Laboratório de Comunicação de Dados Campus - UFRGS [EMAIL PROTECTED] [EMAIL PROTECTED] ___________________________ |
- Re: [java-list] Problema com jbdc Juliano Moraes
- Re: [java-list] Problema com jbdc Mister M