Olá amigos, estava nos "finalmentes" de uma aplicação em C#, estava funcionando tudo, de uma hora pra outra o Update em uma tabela parou de funcionar, o estranho é que não dá mensagem de erro, faz tudo como se tivesse gravado no banco mas qdo vou verificar os dados não foram alterados, em outras tabelas do banco uso da mesma forma e funciona certo. Já olhei o Update Command e tá OK.
Se alguem puder me ajudar ficarei muitíssimo agradecido.
try
{
System.
DateTime dt = System.DateTime.Now;
dT_ULTIMA_ALTERACAOMaskedTextBox.Text = dt.ToShortDateString() + dt.ToUniversalTime().ToString();
nM_USUARIO_ALTERACAOTextBox.Text = usuario_atual.ToString();
btLentes.Enabled =
true;
this.Validate();
this.tB_PEDIDOBindingSource.EndEdit();
this.tB_PEDIDOTableAdapter.Update(this.bD_ControleLCDataSet.TB_PEDIDO);
if (qT_PEDIDOTextBox.Text.Length > 0 && Convert.ToInt16(qT_PEDIDOTextBox.Text) > 0)
btLentes.Enabled =
true;
else
btLentes.Enabled =
false;
btSalvarPedido.Enabled =
false;
btDesfazer.Enabled =
false;
}
catch (System.Data.NoNullAllowedException err)//erro de campos nao informados
{
MessageBox.Show("Erro ao salvar o pedido, um ou mais campos devem ser informados!! Erro: " + err.Message, "Erro");
}
pedido_selecionado =
Convert.ToInt32(nR_PEDIDOTextBox.Text.ToString());