procedure TForm1.FormCreate(Sender:Tobject);beginQuery1.Databasename:='xxx'Query1.Close;Query1.SQL.Add('Select Distinct Field1, Field2 From Table')Query1.Open;end;