Galera eu to tentando fazer uma inserção no banco mas os campos que eu vou pegar do bean vao para o banco como o null, eu ja debuguei e aparece o bean preenchido???
Alguma ideia??
public void inserirDados(Collection list) {
Sindical_Bean beanInterno= new Sindical_Bean();
Iterator it= list.iterator();
String sql=("Insert Into tblBaixaSindical (idPagamento,cnpj" +
",valorJuro,valorMulta,valorDaGuia,exercicio,tipo,meio" +
",banco,entidadeSindical,usuario,capitalSocial,dataVencimento" +
",dataPagamento,dataBaixa) values(000,"+beanInterno.getCnpj()+",0,0,"
+beanInterno.getValorContribuicao()+","+beanInterno.getExercicio()+
",'guia','normal','bb','Fecomercio',63,0,"+beanInterno.getDataVencimento()+","
+beanInterno.getDataPagamento()+","+beanInterno.getDataBaixa()+");");
//conexaoSQLServer = con.conectarBancoSqlServer();
try {
stmt =conexaoSQLServer.createStatement();
//rs= stmt.executeQuery(sql);
while(it.hasNext()){
beanInterno=(Sindical_Bean) it.next();
System.out.println(beanInterno.getCnpj());
rs= stmt.executeQuery(sql);
}
} catch (SQLException e) {
e.printStackTrace();
}
}
Falow!!!!