ComboBox não está gravando o texto nele inserido.

Delphi

29/11/2012

Pessoal, bom dia.

Estou tentando fazer um Update no delphi, porém o combobox cbxempresacaixa não está gravando o texto que está inserido no mesmo.

Abaixo o código:

  with uDtm.frmDtm.Qry_Armazenamento do
  begin
    Close;
    SQL.Clear;

    SQL.Add('update armazenamento set ds_armazenamento = ' + QuotedStr(mDescricao.Text) + ''+', ');
    
SQL.Add('ic_empresa = ' + '''' + cbxEmpresaCaixa.Text + ''''+', ');
SQL.Add('ic_filial = ' + QuotedStr(edtFilial.Text) + ''+', '); if edtNome.Visible = True then SQL.Add('nm_pasta = ' + QuotedStr(edtNome.Text) + ''+', ') else if edtNumeroCaixa.Visible = True then SQL.Add('nr_caixa = ' + QuotedStr(edtNumeroCaixa.Text) + ''+', '); if gbCaixa.Visible = True then begin SQL.Add('dt_caixaini = ' + QuotedStr(edtDtIni.Text) + ''+', '); SQL.Add('dt_caixafim = ' + QuotedStr(edtDtFim.Text) + ''+', ') end; SQL.Add('id_departamento = ' + inttostr(cbxDepartamento.ItemIndex) + ''+', '); SQL.Add('id_titulo = ' + inttostr(vIdTitulo) + ''+', '); SQL.Add('ds_posicao = ' + QuotedStr(edtPosicao.Text) + ' '); SQL.Add('where id_armazenamento = ' + IntToStr(id_armazenamento) + ''); ExecSQL; end;


Já tentei usar QuotedStr tbm no mesmo, mas não deu certo também.

Alguém, por gentileza, pode me ajudar?

Att,
Flavio Silva

Flavio Silva

Curtidas 0

Respostas

Claudia Nogueira

Claudia Nogueira

29/11/2012

O resto das informações estão gravando?

Faz um teste colocando assim:

SQL.Add('ic_empresa = ''teste'', ');
GOSTEI 0
POSTAR