Click here to Skip to main content
15,885,757 members

Comments by joao pedro Jun2022 (Top 14 by date)

joao pedro Jun2022 2-Jul-22 16:04pm View    
What you mean 5ed?
joao pedro Jun2022 1-Jul-22 15:22pm View    
i have seen this code here on codeproject.com

procedure TForm1.sEdit1Change(Sender: TObject);
 var a :integer;
begin
IF sEdit1.Text <> '' then
begin
a:=strtoint(sEdit1.Text);
adoquery1.active:=false;
adoquery1.sql.clear;
ADOQuery1.SQL.Add('select * from employé where num_emp='+inttostr(a));
adoquery1.open;
end
else
begin
adoquery1.active:=false;
adoquery1.sql.clear;
ADOQuery1.SQL.Add('select * from employé');
adoquery1.open;
end;
 end;   

can you code like this with the fields and conditioning i have mentioned, would it work?
joao pedro Jun2022 1-Jul-22 14:47pm View    
i expect when i scroll on torcamentos_New with cod_orcamento = 16
table torcamento_aux cod_Orc quantidade preco_unit iva totalciva1
1,23

when i scrolll on torcamentos_new with cod_Orcamento = 47
table torcamento_aux cod_Orc quantidade preco_unit iva totalciva1
2,46
i need only one record on the Ado query when i scroll o torcamento_new or add records on torcamento_aux
joao pedro Jun2022 1-Jul-22 8:41am View    
the filter i have on ado table is :

procedure TForm1.ADOTorcamentosAfterScroll(DataSet: TDataSet);
begin
if (form1.Active=True) then
begin
If (ADOTOrc_AuxCod_Orc.AsString <>'') and (ADOTOrcamentosCod_orcamento.AsString <>'') then
begin
ADOTorc_Aux.Filtered:=false;
Edit1.Text:=ADOTorcamentosCod_Orcamento.AsString;
ADOTorc_Aux.Filter := ('[Cod_Orc]=' + QuotedStr(Edit1.Text));
ADOTorc_Aux.Filtered:=true;
end;
end;
end;

Can i use the same kind of filter on tado query?
joao pedro Jun2022 1-Jul-22 7:22am View    
can i use a delphi tfilter on the ado query?
like i used on the ado table?