Rotina, não esta Alimentando o Componente
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
Curtidas 0
Respostas
Natanael Ferreira
10/10/2017
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
GOSTEI 0
Claudemir Laureano
10/10/2017
Então, na verdade o problema é com o componente mesmo não sei onde ele pega o UF .acbr problema.
GOSTEI 0