Fórum Rotina, não esta Alimentando o Componente #586627
10/10/2017
0
procedure TFENCERRAR_MDFE.btnInserirClick(Sender: TObject);
begin
Close;
end;
procedure TFENCERRAR_MDFE.cbUfChange(Sender: TObject);
begin
QryMunicipioEnce.Close;
QryMunicipioEnce.Params.ClearValues();
QryMunicipioEnce.Params[0].AsString := cbUf.Text;
QryMunicipioEnce.Open();
//LIMPA COMBOBOX ANTES DE POPULAR
cbMunicipio.Clear;
//SELECIONA UMA CIDADE PELO MINICIPIO
QryMunicipioEnce.First;
while not QryMunicipioEnce.Eof do
begin
cbMunicipio.Items.AddObject(QryMunicipioEnceMUNICIPIO.AsString,TObject(QryMunicipioEnceCOD_IBGE.AsInteger));
QryMunicipioEnce.Next;
end;
end;
procedure TFENCERRAR_MDFE.FormShow(Sender: TObject);
begin
txtIdMDFe.Text := IntToStr(IDMDFE);
txtChaveMDFe.Text := CHAVE_MDFE;
txtProtocolo.Text := PROTOCOLO;
txtCnpjEmitente.Text := CNPJ_EMITENTE;
end;
end.
Claudemir Laureano
Curtir tópico
+ 0
Responder
Posts
10/10/2017
Natanael Ferreira
Após abrir sua query QryMunicipioEnce já tentou ver se está retornando algum registro no resultado.
Coloque um RecordCount na linha abaixo do open da query para saber quantos registros está retornando.
Coloque um RecordCount na linha abaixo do open da query para saber quantos registros está retornando.
procedure TFENCERRAR_MDFE.cbUfChange(Sender: TObject); begin . .// Inicio do codigo . QryMunicipioEnce.Open(); ShowMessage(IntToStr(QryMunicipioEnce.RecordCount)); // adicionei esta linha para teste . .// Restante do código
Responder
Gostei + 0
11/10/2017
Claudemir Laureano
Então, na verdade o problema é com o componente mesmo não sei onde ele pega o UF .acbr problema.
Responder
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)