0% found this document useful (0 votes)
14 views

Nama: Imam Arifin NIM: 181010800119 Kelas: 02TIDE003/OO7 Dosen: Aceng Abdul Hamid. ST, MM

This document contains interface and coding information for a database program. It includes: 1. An interface program with form controls to add, edit, search and display employee data from a database table. 2. Code snippets for the button click events to add new data, search by employee ID, and change between tabs to display all records. The interface allows input of employee name, ID, address, birthdate and salary. Buttons add new records and search by ID. A query populates a datagrid to display all records. Code shows appending new records, clearing and refreshing queries on button clicks and tab changes.

Uploaded by

Ketogk.terem
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

Nama: Imam Arifin NIM: 181010800119 Kelas: 02TIDE003/OO7 Dosen: Aceng Abdul Hamid. ST, MM

This document contains interface and coding information for a database program. It includes: 1. An interface program with form controls to add, edit, search and display employee data from a database table. 2. Code snippets for the button click events to add new data, search by employee ID, and change between tabs to display all records. The interface allows input of employee name, ID, address, birthdate and salary. Buttons add new records and search by ID. A query populates a datagrid to display all records. Code shows appending new records, clearing and refreshing queries on button clicks and tab changes.

Uploaded by

Ketogk.terem
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Nama : Imam Arifin

NIM : 181010800119
Kelas : 02TIDE003/OO7
Dosen : Aceng Abdul Hamid. ST, MM

1. Interface Program

Pgc1 edNIP Tbl1 Con1 Qry11

Ds1

NIP
edNama
Nama
edAlamat
Alamat
edtTgl
Tgl_Lahir
Gaji edGaji

btnTambah btnBatal

NIP edCariNIP btnCari Dbgrd1


Tampilan database pada Microsoft Access

2. Coding Program
Nama Komponen Event Perintah
BtnTambah
OnClick procedure TForm1.btnTambahClick(Sender: TObject);
begin
tbl1.Append;
tbl1['NIP']:=edNIP.Text;
tbl1['Nama']:=edNama.Text;
tbl1['Alamat']:=edAlamat.Text;
bl1['Tgl_Lahir']:=StrToDate(medtTgl.Text);
tbl1['Gaji']:=StrToInt(edGaji.Text);
tbl1.Post;
with qry1 do
begin
Active:=False;
SQL.Clear;
SQL.Add('SELECT * from Tabel') ;
Active:=true;
end;
end;
BtnCari OnClick procedure TForm1.btnCariClick(Sender: TObject);
begin
with qry1 do
begin
Active:=False;
SQL.Clear;
SQL.Add('SELECT * from Tabel');
SQL.Add('WHERE NIP LIKE '+edCariNIP.Text+'');
Active:=True;
end;
end;
Pgc1 OnChange procedure TForm1.pgc1Change(Sender: TObject);
begin
if (pgc1.TabIndex=1) then
begin
with qry1 do
begin
Active:=False;
SQL.Clear;
SQL.Add('SELECT * from Tabel') ;
Active:=true;
end;
end;
end;

You might also like