Menampilkan Search dalam Tabel DELPHI

20:32

charticha.blogspot.com/





procedure TfrSearch.RadioButton1Click(Sender: TObject);
begin
  with ComboBox1 do
    begin
      Items.Add('Album_Name');
      Items.Add('Lokasi');
    end;
    vtabel:='tbAlbum';
end;

procedure TfrSearch.RadioButton2Click(Sender: TObject);
begin
  with ComboBox1 do
    begin
      Items.Add('Date');
      Items.Add('Person');
    end;
    vtabel:='tbFoto';
end;

procedure TfrSearch.edCariChange(Sender: TObject);
begin
    if edCari.Text<>'' then
    begin
      with DM.AQSearch do
        begin
         DM.AQSearch.Close;
         DM.AQSearch.SQL.Clear;
         DM.AQSearch.SQL.Text:='SELECT tbFoto.Filename, tbFoto.Resolusi, tbFoto.Foto, tbFoto.Person, tbAlbum.Lokasi '+
                    'FROM tbFoto, tbAlbum  where tbAlbum.Kode_Album=tbFoto.Kode_Album and '+ vtabel +'.'+
                     ComboBox1.Text + ' Like '+ QuotedStr('*'+edCari.Text+'*');
         DM.AQSearch.Open;
        end;
    end;
end;


Previous
Next Post »
0 Komentar