Fórum Duvida INSERT bd csharp #531578
14/09/2015
0
if (txtValor.Text.Length > 1 && txtVencimento.Text.Length >= 6 && txtPagamento.Text.Length >= 6)
{
string sql = string.Format
(
"INSERT INTO despesa (id_dist, id_tipo, id_usuario, valor, vencimento, dt_pagamento) VALUES (', , , , , ')",
cboDistribuidora.ValueMember,
cboTPDesp.ValueMember,
Sessao.IDUsuario,
txtValor.Text,
txtVencimento.Text,
txtPagamento.Text
);
mysql.query(sql);
txtValor.Text = txtVencimento.Text = txtPagamento.Text = txtProcura.Text = string.Empty;
carregaDados("");
}Ele simplesmente não vai :/
Adriano
Curtir tópico
+ 0Posts
14/09/2015
Hector Figueroa
Gostei + 0
14/09/2015
Adriano
Então, eu sou novo na parada toda! :p
Não fiz isso não, mas eu acredito que tá dando problema em 2 coisinhas -
cboDistribuidora.ValueMember,
cboTPDesp.ValueMember,
Sessao.IDUsuario,Talvez tenho que formatar elas, ou algo do tipo?
Gostei + 0
14/09/2015
Hector Figueroa
Gostei + 0
14/09/2015
Adriano
(', , , , , ')"na verdade é
('', '', '', '', '', '')"Gostei + 0
14/09/2015
Jothaz
Gostei + 0
14/09/2015
Adriano
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)