2 개의 Tadoquery로 작업하고 Tadoquery (마스터) Tadotable (세부 사항)처럼 작동 할 수있는 방법 !! 마스터/세부 방법은 VCL 데이터 세트와 함께 자동으로 처리 된 고대 역사 (즉, 5 년 전)에서 말하기2 TADOQUERY 마스터 및 세부 테이블 필터 삽입
var tempvar : Variant;
begin
Edit1.text:=Ano.value;
Begin
with Ano_planeamento do //Laço de consulta por codigo
Begin
Close;
SQL.Clear;
SQL.Add('SELECT * from planeamento_ano');
SQL.Add('Where ano LIKE ''%'+Edit1.text+'%''');
Open;
end;
end;
tempvar := Ano_planeamento.fieldbyname('ano').value;
planeamento.close;
if tempvar <> null then
begin
planeamento.SQL.Clear;
planeamento.SQL.add('SELECT * FROM planeamento');
planeamento.SQL.add(' WHERE ano = ');
planeamento.SQL.add('''' + tempvar + '''');
// here i nead to filter by ....
planeamento.open;