Arsip: [ask]menampilkan data dari dua table dalam satu from
more 13 years ago
kepiss
temen-temen saya lagi belajar delphi ne..mohon pertolongan
procedure TFpotongan.EnipChange(Sender: TObject);
var
query: string;
begin
with dm.querypegawai do
with dm.queryjabatan do
begin
close;
sql.Clear;
sql.Add('select * from pegawai,jabatan where pegawai.nip=jabatan.nip=:kd ');
parameters.ParamByName('kd').Value:=(enip.Text);
dm.querypegawai.Open;
if not eof then
enama.Text:=fieldbyname('nama_pegawai').AsString;
ekantor.Text:=fieldbyname('kantor').AsString;
ejabatan.Text:=fieldbyname('jabatan').AsString;
dengan code diatas ane mau nampilin data daritable pegawai dan jabatan dengan memasukan NIP pegawai di Tedit...gak ada errornya tapi kok datanya gak mau muncul ya....semoga ada yang bisa bantu saya..amien..
more 13 years ago
madi
coba dulu ya siapa tahu ada yg salah :D
[sql] with ADOQuery1 do
begin
close;
SQL.Text := 'SELECT A.NAMA_PEGAWAI,B.JABATAN,A.KANTOR FROM PEGAWAI A, JABATAN B '+
' WHERE A.NIP = B.NIP AND A.NIP = '+ QuotedStr(enip.text) + ' AND B.NIP = '+
QuotedStr(enip.text);
open;
end;
enama.Text:=fieldbyname('nama_pegawai').AsString;
ekantor.Text:=fieldbyname('kantor').AsString;
ejabatan.Text:=fieldbyname('jabatan').AsString;[/sql]
more 13 years ago
ihfan_wa2w
koreksi sedikit sql nya, coba begini:
select p.nip,p.nama,j.jabatan from pegawai p,jabatan j where p.nip=j.nip and p.nip=:nip
semoga membantu.
more ...
- Pages:
- 1
reply |
Report Obsolete
Last Articles
Last Topic
- PascalTalk #6: (Podcast) Kuliah IT di luar negeri, susah gak sih?
by LuriDarmawan in Tutorial & Community Project more 4 years ago - PascalTalk #5: UX: Research, Design and Engineer
by LuriDarmawan in Tutorial & Community Project more 4 years ago - PascalTalk #4: Obrolan Ringan Seputar IT
by LuriDarmawan in Tutorial & Community Project more 4 years ago - PascalTalk #2: Membuat Sendiri SMART HOME
by LuriDarmawan in Tutorial & Community Project more 4 years ago - PascalTalk #3: RADically Fast and Easy Mobile Apps Development with Delphi
by LuriDarmawan in Tutorial & Community Project more 4 years ago - PascalTalk #1: Pemanfaatan Artificial Intelligence di Masa Covid-19
by LuriDarmawan in Tutorial & Community Project more 4 years ago - Tempat Latihan Posting
by LuriDarmawan in OOT more 5 years ago - Archive
- Looping lagi...
by idhiel in Hal umum tentang Pascal Indonesia more 12 years ago - [ask] koneksi ke ODBC user Dsn saat runtime dengan ado
by halimanh in FireBird more 12 years ago - Validasi menggunakan data tanggal
by mas_kofa in Hal umum tentang Pascal Indonesia more 12 years ago
Random Topic
- pingin tahu TmediaPlayer
by bagus in Multimedia & Graphic Enhancement more 18 years ago - Memperkirakan Waktu utk Meng-copy file atau Men-search file
by bboyz in MySQL more 17 years ago - Konsultasi Kode : Mohawk
by cyber_hecker in Tutorial & Community Project more 18 years ago - spasi kosong di fast report
by one in Reporting more 16 years ago - transfer waktu ke SQL
by coacoac in Tip n Trik Pemrograman more 17 years ago - Tanya Lagi Perhitungan sub report di Crystal Report
by onsir in MySQL more 17 years ago - tanya untuk aplikasi base data
by Handoyo in FireBird more 18 years ago - Query Error
by Yudho in Hal umum tentang Pascal Indonesia more 17 years ago - kode barang Input dengan scanner
by wati in Hal umum tentang Pascal Indonesia more 17 years ago - Button clik jalan di xp, ngak jalan di win 2000 ? bantu donk
by Sutilkon in Tip n Trik Pemrograman more 17 years ago