Duvida INSERT bd csharp
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
Posts
14/09/2015
Hector Figueroa
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?
14/09/2015
Hector Figueroa
14/09/2015
Adriano
(', , , , , ')"
na verdade é
('', '', '', '', '', '')"
Clique aqui para fazer login e interagir na Comunidade :)