Estou esquecendo de alguma coisa?

Delphi

29/09/2016

procedure TfrmPrincipal.btnPesquisarClick(Sender: TObject);
begin
DM.qryProdutos.Close;
DM.qryProdutos.RestoreSQL;
if edtProduto.Text <> '' then
begin
try
StrToFloat(edtProduto.Text);
DM.qryProdutos.AddWhere(' PCPRODUT.CODPROD = ' +edtProduto.Text );
except
DM.qryProdutos.AddWhere(' PCPRODUT.DESCRICAO LIKE ''%' +edtProduto.Text + '%'' ' );
end;
end;
DM.qryProdutos.Open;
DM.qryCodSim.Close;
DM.qryCodSim.Open;
DM.qryProdutoSimilar.Close;
DM.qryProdutoSimilar.RestoreSQL;
end;
var
vin : String ;
begin
while not DM.qryProdutoSimilar.Eof do
begin
if vin = '' then
vin := DM.qryProdutoSimilar.FieldByName('codprod').AsString
else
vin := vin + ',' + dm.qryProdutoSimilar.FieldByName('codprod').AsString ;
DM.qryProdutoSimilar.next;
end;
DM.qryProdutoSimilar.AddWhere(' PCPRODUT.CODPROD in (' + vin + ')');
end
DM.qryProdutoSimilar.Open;
end;
Átila Lyncon

Átila Lyncon

Curtidas 0

Melhor post

Deivid Nascimento

Deivid Nascimento

29/09/2016

da algum erro?
GOSTEI 1

Mais Respostas

Jones Granatyr

Jones Granatyr

29/09/2016

Se puder explicar melhor o que está dando errado!
GOSTEI 0
POSTAR