Delphi Find syntax

16 06 2008

begin
with DataModule1.ADOQuery1 do
begin
SQL.Clear;
Active := False;
strSQL := ‘select id_pegawai,nm_pegawai,alamat,telp,jns_kelamin from pegawai where id_pegawai=’;
strSQL := strSQL + QuotedStr(Edit1.Text);
SQL.Text := strSQL;
ExecSQL;
Active := true;
if Not eof then
begin
Edit2.Text := Fields[1].AsString;
Edit3.Text := Fields[2].AsString;
Edit4.Text := Fields[3].AsString;
cmb_1.Items.Add(Fields[4].AsString);
btn_save.Enabled:=false;
btn_update.Enabled := true;
btn_delete.Enabled := true;
btn_clean.Enabled:=true;
endx
else
begin
btn_save.Enabled := True;
btn_update.Enabled := false;
btn_delete.Enabled := False;
btn_clean.Enabled:=true;
end;
end;

Iklan

Aksi

Information

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s




%d blogger menyukai ini: