saindras

[PembekalanPRAKERIN2015] Isi ComboBox Jabatan

Jun 21st, 2015
286
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Delphi 0.52 KB | None | 0 0
  1. //======== ISI COMBOBOX JABATAN =======================================
  2. procedure TForm1.FormShow(Sender: TObject);
  3. begin
  4.   ZQuery1.Active := FALSE;
  5.   ZQuery1.SQL.Clear;
  6.   ZQuery1.SQL.Add('select * from tb_jabatan');
  7.   ZQuery1.Active := TRUE;
  8.   ComboBox1.Items.Clear;
  9.   ZQuery1.First;
  10.   while not ZQuery1.Eof do
  11.   begin
  12.     ComboBox1.Items.Add(ZQuery1.fieldbyname('jabatan').AsString);
  13.     ZQuery1.Next;
  14.   end;
  15.   ComboBox1.ItemIndex := 0;
  16. end;
  17. //=====================================================================
Advertisement
Add Comment
Please, Sign In to add comment