Enviado em 03/02/2017 - 00:04h
Agradeço ajuda para este erro do título:
-- Table: telefone
-- DROP TABLE telefone;
CREATE TABLE telefone
(
id_telefone serial NOT NULL,
numero_tel character varying(15),
CONSTRAINT pk_tel PRIMARY KEY (id_telefone)
)
WITH (
OIDS=FALSE
);
ALTER TABLE telefone
OWNER TO postgres;
private void btnSalvarActionPerformed(java.awt.event.ActionEvent evt) {
modeloTel.setTel(jformTel.getText()); // 3:15
controleTel.inserir(modeloTel);
btnDeletar.setEnabled(false);
btnAlterar.setEnabled(false);
btnNovo.setEnabled(true);
btnSalvar.setEnabled(false);
txtCod.setText("");
jformTel.setEnabled(false);
preencherTabela("SELECT * FROM telefone ORDER BY id_telefone");
public class ModeloTelefone { // 1:24
private int cod;
private String tel;
/**
* @return the cod
*/
public int getCod() {
return cod;
}
/**
* @param cod the cod to set
*/
public void setCod(int cod) {
this.cod = cod;
}
/**
* @return the tel
*/
public String getTel() {
return tel;
}
/**
* @param tel the tel to set
*/
public void setTel(String tel) {
this.tel = tel;
}
}
public void inserir(ModeloTelefone obj){ //3:37
conectaBanco.conexao();
try {
PreparedStatement pst= conectaBanco.con.prepareStatement("INSERT INTO telefone (numero_tel=?)VALUES(?)");
pst.setString(1, obj.getTel());
pst.execute();
JOptionPane.showMessageDialog(null, "INSERIDO com sucesso pela Camada Controle");
} catch (SQLException ex) {
JOptionPane.showMessageDialog(null, "não INSERIDO com sucesso pela Camada Controle"+ex);
}
conectaBanco.desconecta();
}
Como aprovar Pull Requests em seu repositório Github via linha de comando
Como gerar um podcast a partir de um livro em PDF
Automatizando digitação de códigos 2FA no browser
Resolver problemas de Internet
Como compartilhar a tela do Ubuntu com uma Smart TV (LG, Samsung, etc.)
Como Definir o Painel Principal em Múltiplos Monitores no Linux Mint
Minecraft Launcher para Arch Linux
Instalar o Apache, MySQL e PHP no Oracle Linux 8
Resolvendo o erro "libQt6Widgets.so.6: cannot open shared object file" no Linux
Como bloquear e desbloquear papel de parede no Ubuntu 24.04 (1)
Mouse bluetooth no Debian 12.10. (0)
tentando instalar em um notebook antigo o Linux LegacyOS_2023... (2)